mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
#include "platform/socket.hpp"
|
||||
|
||||
#include "base/file_name_utils.hpp"
|
||||
#include "base/scope_guard.hpp"
|
||||
#include "base/logging.hpp"
|
||||
#include "base/scope_guard.hpp"
|
||||
|
||||
#include "coding/file_writer.hpp"
|
||||
|
||||
@@ -52,7 +52,7 @@ std::unique_ptr<Socket> CreateSocket()
|
||||
{
|
||||
return std::unique_ptr<Socket>();
|
||||
}
|
||||
} // namespace platform
|
||||
} // namespace platform
|
||||
|
||||
Platform::Platform()
|
||||
{
|
||||
@@ -111,7 +111,7 @@ bool Platform::IsFileExistsByFullPath(string const & filePath)
|
||||
return ::GetFileAttributesA(filePath.c_str()) != INVALID_FILE_ATTRIBUTES;
|
||||
}
|
||||
|
||||
//static
|
||||
// static
|
||||
void Platform::DisableBackupForFile(string const & filePath) {}
|
||||
|
||||
// static
|
||||
@@ -196,7 +196,8 @@ bool Platform::IsDirectoryEmpty(string const & directory)
|
||||
|
||||
bool Platform::GetFileSizeByFullPath(string const & filePath, uint64_t & size)
|
||||
{
|
||||
HANDLE hFile = CreateFileA(filePath.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
HANDLE hFile =
|
||||
CreateFileA(filePath.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (hFile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
SCOPE_GUARD(autoClose, bind(&CloseHandle, hFile));
|
||||
@@ -212,7 +213,11 @@ bool Platform::GetFileSizeByFullPath(string const & filePath, uint64_t & size)
|
||||
|
||||
namespace
|
||||
{
|
||||
enum class FileTimeType { Creation, Modification };
|
||||
enum class FileTimeType
|
||||
{
|
||||
Creation,
|
||||
Modification
|
||||
};
|
||||
time_t GetFileTime(std::string const & path, FileTimeType fileTimeType)
|
||||
{
|
||||
HANDLE hFile = CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
|
||||
@@ -227,12 +232,8 @@ time_t GetFileTime(std::string const & path, FileTimeType fileTimeType)
|
||||
|
||||
switch (fileTimeType)
|
||||
{
|
||||
case FileTimeType::Creation:
|
||||
ftCreate = &ft;
|
||||
break;
|
||||
case FileTimeType::Modification:
|
||||
ftLastWrite = &ft;
|
||||
break;
|
||||
case FileTimeType::Creation: ftCreate = &ft; break;
|
||||
case FileTimeType::Modification: ftLastWrite = &ft; break;
|
||||
}
|
||||
|
||||
if (!GetFileTime(hFile, ftCreate, nullptr, ftLastWrite))
|
||||
@@ -243,7 +244,7 @@ time_t GetFileTime(std::string const & path, FileTimeType fileTimeType)
|
||||
ull.HighPart = ft.dwHighDateTime;
|
||||
return static_cast<time_t>(ull.QuadPart / 10000000ULL - 11644473600ULL);
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
time_t Platform::GetFileCreationTime(std::string const & path)
|
||||
@@ -257,6 +258,4 @@ time_t Platform::GetFileModificationTime(std::string const & path)
|
||||
return GetFileTime(path, FileTimeType::Modification);
|
||||
}
|
||||
|
||||
void Platform::GetSystemFontNames(FilesList & res) const
|
||||
{
|
||||
}
|
||||
void Platform::GetSystemFontNames(FilesList & res) const {}
|
||||
|
||||
Reference in New Issue
Block a user