Reformat code with clang format

This commit is contained in:
Clang Format
2023-11-19 15:28:38 +01:00
committed by Jan
parent 22e17272fd
commit 6b4f5d94a8
1099 changed files with 16763 additions and 18076 deletions

View File

@ -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
{

View File

@ -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)

View File

@ -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;
};
};

View File

@ -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;

View File

@ -18,4 +18,4 @@ public:
SearchPathSearchOptions& OnlyDiskFiles(bool value);
SearchPathSearchOptions& AbsolutePaths(bool value);
SearchPathSearchOptions& FilterExtensions(std::string extension);
};
};

View File

@ -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();
}
}

View File

@ -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);