mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-16 17:57:57 -05:00
Reformat code with clang format
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include "SearchPathSearchOptions.h"
|
||||
#include "Utils/ClassUtils.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <istream>
|
||||
#include <memory>
|
||||
#include <cstdint>
|
||||
|
||||
#include "Utils/ClassUtils.h"
|
||||
#include "SearchPathSearchOptions.h"
|
||||
|
||||
class SearchPathOpenFile
|
||||
{
|
||||
|
@ -1,10 +1,10 @@
|
||||
#include "SearchPathFilesystem.h"
|
||||
|
||||
#include "Utils/ObjFileStream.h"
|
||||
|
||||
#include <filesystem>
|
||||
#include <fstream>
|
||||
|
||||
#include "Utils/ObjFileStream.h"
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
SearchPathFilesystem::SearchPathFilesystem(std::string path)
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ISearchPath.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class SearchPathFilesystem final : public ISearchPath
|
||||
{
|
||||
std::string m_path;
|
||||
@ -14,4 +14,4 @@ public:
|
||||
SearchPathOpenFile Open(const std::string& fileName) override;
|
||||
std::string GetPath() override;
|
||||
void Find(const SearchPathSearchOptions& options, const std::function<void(const std::string&)>& callback) override;
|
||||
};
|
||||
};
|
||||
|
@ -34,7 +34,7 @@ SearchPathSearchOptions& SearchPathSearchOptions::FilterExtensions(std::string e
|
||||
m_extension = std::move(extension);
|
||||
m_filter_extensions = true;
|
||||
|
||||
if(m_extension[0] != '.')
|
||||
if (m_extension[0] != '.')
|
||||
m_extension = "." + m_extension;
|
||||
|
||||
return *this;
|
||||
|
@ -18,4 +18,4 @@ public:
|
||||
SearchPathSearchOptions& OnlyDiskFiles(bool value);
|
||||
SearchPathSearchOptions& AbsolutePaths(bool value);
|
||||
SearchPathSearchOptions& FilterExtensions(std::string extension);
|
||||
};
|
||||
};
|
||||
|
@ -4,11 +4,11 @@
|
||||
|
||||
SearchPathOpenFile SearchPaths::Open(const std::string& fileName)
|
||||
{
|
||||
for(auto* searchPathEntry : m_search_paths)
|
||||
for (auto* searchPathEntry : m_search_paths)
|
||||
{
|
||||
auto file = searchPathEntry->Open(fileName);
|
||||
|
||||
if(file.IsOpen())
|
||||
if (file.IsOpen())
|
||||
{
|
||||
return file;
|
||||
}
|
||||
@ -43,9 +43,9 @@ void SearchPaths::IncludeSearchPath(ISearchPath* searchPath)
|
||||
|
||||
void SearchPaths::RemoveSearchPath(ISearchPath* searchPath)
|
||||
{
|
||||
for(auto i = m_search_paths.begin(); i != m_search_paths.end(); ++i)
|
||||
for (auto i = m_search_paths.begin(); i != m_search_paths.end(); ++i)
|
||||
{
|
||||
if(*i == searchPath)
|
||||
if (*i == searchPath)
|
||||
{
|
||||
m_search_paths.erase(i);
|
||||
return;
|
||||
@ -61,4 +61,4 @@ SearchPaths::iterator SearchPaths::begin()
|
||||
SearchPaths::iterator SearchPaths::end()
|
||||
{
|
||||
return m_search_paths.end();
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "ISearchPath.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class SearchPaths final : public ISearchPath
|
||||
{
|
||||
std::vector<ISearchPath*> m_search_paths;
|
||||
@ -37,8 +37,8 @@ public:
|
||||
void IncludeSearchPath(ISearchPath* searchPath);
|
||||
|
||||
/**
|
||||
* \brief Removes a search path from the \c SearchPaths object. If the search path was committed then it will \b NOT be deleted when destructing the \c SearchPaths object.
|
||||
* \param searchPath The search path to remove.
|
||||
* \brief Removes a search path from the \c SearchPaths object. If the search path was committed then it will \b NOT be deleted when destructing the \c
|
||||
* SearchPaths object. \param searchPath The search path to remove.
|
||||
*/
|
||||
void RemoveSearchPath(ISearchPath* searchPath);
|
||||
|
||||
|
Reference in New Issue
Block a user