From 1d65aaee714346bcff899f45a64abed2f48dda77 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Thu, 18 Apr 2024 07:43:33 +0300 Subject: [PATCH] Formatting --- apps/niftest/niftest.cpp | 1 - components/bgsm/stream.hpp | 5 ++--- components/nifosg/nifloader.cpp | 20 ++++++++++++-------- components/nifosg/nifloader.hpp | 3 ++- components/resource/resourcesystem.cpp | 3 ++- components/resource/scenemanager.cpp | 3 ++- 6 files changed, 20 insertions(+), 15 deletions(-) diff --git a/apps/niftest/niftest.cpp b/apps/niftest/niftest.cpp index 3cd4382121..c364303376 100644 --- a/apps/niftest/niftest.cpp +++ b/apps/niftest/niftest.cpp @@ -89,7 +89,6 @@ void readNIF( } } - void readMaterial( const std::filesystem::path& source, const std::filesystem::path& path, const VFS::Manager* vfs, bool quiet) { diff --git a/components/bgsm/stream.hpp b/components/bgsm/stream.hpp index 8b0e1efdbe..2e03a52dd4 100644 --- a/components/bgsm/stream.hpp +++ b/components/bgsm/stream.hpp @@ -3,9 +3,9 @@ #include #include +#include #include #include -#include #include #include #include @@ -58,8 +58,7 @@ namespace Bgsm Files::IStreamPtr mStream; public: - explicit BGSMStream( - const Reader& reader, Files::IStreamPtr&& stream) + explicit BGSMStream(const Reader& reader, Files::IStreamPtr&& stream) : mReader(reader) , mStream(std::move(stream)) { diff --git a/components/nifosg/nifloader.cpp b/components/nifosg/nifloader.cpp index 08a4fd5d89..657d053706 100644 --- a/components/nifosg/nifloader.cpp +++ b/components/nifosg/nifloader.cpp @@ -240,7 +240,8 @@ namespace NifOsg { public: /// @param filename used for warning messages. - LoaderImpl(const std::filesystem::path& filename, unsigned int ver, unsigned int userver, unsigned int bethver, Resource::BgsmFileManager* materialMgr) + LoaderImpl(const std::filesystem::path& filename, unsigned int ver, unsigned int userver, unsigned int bethver, + Resource::BgsmFileManager* materialMgr) : mFilename(filename) , mVersion(ver) , mUserVersion(userver) @@ -783,7 +784,8 @@ namespace NifOsg else { if (args.mHasMarkers) - skip = Misc::StringUtils::ciStartsWith(nifNode->mName, "EditorMarker") || Misc::StringUtils::ciStartsWith(nifNode->mName, "VisibilityEditorMarker"); + skip = Misc::StringUtils::ciStartsWith(nifNode->mName, "EditorMarker") + || Misc::StringUtils::ciStartsWith(nifNode->mName, "VisibilityEditorMarker"); } if (!skip) { @@ -2162,8 +2164,8 @@ namespace NifOsg handleTextureControllers(texprop, composite, imageManager, stateset, animflags); } - void handleShaderMaterial(const std::string& path, osg::StateSet* stateset, Resource::ImageManager* imageManager, - std::vector& boundTextures) + void handleShaderMaterial(const std::string& path, osg::StateSet* stateset, + Resource::ImageManager* imageManager, std::vector& boundTextures) { if (!mMaterialMgr) return; @@ -2229,8 +2231,8 @@ namespace NifOsg stateset->setTextureMode(i, GL_TEXTURE_2D, osg::StateAttribute::OFF); boundTextures.clear(); } - std::string filename = Misc::ResourceHelpers::correctTexturePath( - bgem->mBaseMap, imageManager->getVFS()); + std::string filename + = Misc::ResourceHelpers::correctTexturePath(bgem->mBaseMap, imageManager->getVFS()); osg::ref_ptr image = imageManager->getImage(filename); osg::ref_ptr texture2d = new osg::Texture2D(image); texture2d->setName("diffuseMap"); @@ -2976,9 +2978,11 @@ namespace NifOsg } }; - osg::ref_ptr Loader::load(Nif::FileView file, Resource::ImageManager* imageManager, Resource::BgsmFileManager* materialMgr) + osg::ref_ptr Loader::load( + Nif::FileView file, Resource::ImageManager* imageManager, Resource::BgsmFileManager* materialMgr) { - LoaderImpl impl(file.getFilename(), file.getVersion(), file.getUserVersion(), file.getBethVersion(), materialMgr); + LoaderImpl impl( + file.getFilename(), file.getVersion(), file.getUserVersion(), file.getBethVersion(), materialMgr); return impl.load(file, imageManager); } diff --git a/components/nifosg/nifloader.hpp b/components/nifosg/nifloader.hpp index b016248f07..14f16088cc 100644 --- a/components/nifosg/nifloader.hpp +++ b/components/nifosg/nifloader.hpp @@ -31,7 +31,8 @@ namespace NifOsg public: /// Create a scene graph for the given NIF. Auto-detects when skinning is used and wraps the graph in a Skeleton /// if so. - static osg::ref_ptr load(Nif::FileView file, Resource::ImageManager* imageManager, Resource::BgsmFileManager* materialManager); + static osg::ref_ptr load( + Nif::FileView file, Resource::ImageManager* imageManager, Resource::BgsmFileManager* materialManager); /// Load keyframe controllers from the given kf file. static void loadKf(Nif::FileView kf, SceneUtil::KeyframeHolder& target); diff --git a/components/resource/resourcesystem.cpp b/components/resource/resourcesystem.cpp index 33bba791a8..f012627efb 100644 --- a/components/resource/resourcesystem.cpp +++ b/components/resource/resourcesystem.cpp @@ -18,7 +18,8 @@ namespace Resource mNifFileManager = std::make_unique(vfs, encoder); mBgsmFileManager = std::make_unique(vfs, expiryDelay); mImageManager = std::make_unique(vfs, expiryDelay); - mSceneManager = std::make_unique(vfs, mImageManager.get(), mNifFileManager.get(), mBgsmFileManager.get(), expiryDelay); + mSceneManager = std::make_unique( + vfs, mImageManager.get(), mNifFileManager.get(), mBgsmFileManager.get(), expiryDelay); mKeyframeManager = std::make_unique(vfs, mSceneManager.get(), expiryDelay, encoder); addResourceManager(mNifFileManager.get()); diff --git a/components/resource/scenemanager.cpp b/components/resource/scenemanager.cpp index daeafeaf1d..690e38bbf8 100644 --- a/components/resource/scenemanager.cpp +++ b/components/resource/scenemanager.cpp @@ -797,7 +797,8 @@ namespace Resource } osg::ref_ptr load(VFS::Path::NormalizedView normalizedFilename, const VFS::Manager* vfs, - Resource::ImageManager* imageManager, Resource::NifFileManager* nifFileManager, Resource::BgsmFileManager* materialMgr) + Resource::ImageManager* imageManager, Resource::NifFileManager* nifFileManager, + Resource::BgsmFileManager* materialMgr) { const std::string_view ext = Misc::getFileExtension(normalizedFilename.value()); if (ext == "nif")