mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-02 00:00:26 +02:00
Reformat the code, using:
find -type f | # list all regular files grep -E '\.(h|cpp|mm)$' | # filter for source files grep -v '/mt_' | # filter out generated files grep -v '/vendor/' | # and vendored GL grep -v '/test/image_loader_test.cpp' | # and this file (has giant literals arrays) xargs -n 1 -P $(nproc) clang-format -i # reformat everything Co-authored-by: numzero <numzer0@yandex.ru>
This commit is contained in:
@ -13,7 +13,7 @@ namespace io
|
||||
|
||||
//! Type used for all file system related strings.
|
||||
/** This type will transparently handle different file system encodings.
|
||||
NOTE: For historical reasons the tool-functions using io::path are all in coreutil.h
|
||||
NOTE: For historical reasons the tool-functions using io::path are all in coreutil.h
|
||||
*/
|
||||
typedef core::string<fschar_t> path;
|
||||
|
||||
@ -22,7 +22,7 @@ static_assert(sizeof(fschar_t) == sizeof(char));
|
||||
|
||||
//! Used in places where we identify objects by a filename, but don't actually work with the real filename
|
||||
/** Irrlicht is internally not case-sensitive when it comes to names.
|
||||
Also this class is a first step towards support for correctly serializing renamed objects.
|
||||
Also this class is a first step towards support for correctly serializing renamed objects.
|
||||
*/
|
||||
struct SNamedPath
|
||||
{
|
||||
@ -30,32 +30,33 @@ struct SNamedPath
|
||||
SNamedPath() {}
|
||||
|
||||
//! Constructor
|
||||
SNamedPath(const path& p) : Path(p), InternalName( PathToName(p) )
|
||||
SNamedPath(const path &p) :
|
||||
Path(p), InternalName(PathToName(p))
|
||||
{
|
||||
}
|
||||
|
||||
//! Is smaller comparator
|
||||
bool operator <(const SNamedPath& other) const
|
||||
bool operator<(const SNamedPath &other) const
|
||||
{
|
||||
return InternalName < other.InternalName;
|
||||
}
|
||||
|
||||
//! Set the path.
|
||||
void setPath(const path& p)
|
||||
void setPath(const path &p)
|
||||
{
|
||||
Path = p;
|
||||
InternalName = PathToName(p);
|
||||
}
|
||||
|
||||
//! Get the path.
|
||||
const path& getPath() const
|
||||
const path &getPath() const
|
||||
{
|
||||
return Path;
|
||||
};
|
||||
|
||||
//! Get the name which is used to identify the file.
|
||||
//! This string is similar to the names and filenames used before Irrlicht 1.7
|
||||
const path& getInternalName() const
|
||||
const path &getInternalName() const
|
||||
{
|
||||
return InternalName;
|
||||
}
|
||||
@ -68,10 +69,10 @@ struct SNamedPath
|
||||
|
||||
protected:
|
||||
// convert the given path string to a name string.
|
||||
path PathToName(const path& p) const
|
||||
path PathToName(const path &p) const
|
||||
{
|
||||
path name(p);
|
||||
name.replace( '\\', '/' );
|
||||
name.replace('\\', '/');
|
||||
name.make_lower();
|
||||
return name;
|
||||
}
|
||||
@ -83,4 +84,3 @@ private:
|
||||
|
||||
} // io
|
||||
} // irr
|
||||
|
||||
|
Reference in New Issue
Block a user