Format all C++ and Java code via clang-format

Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
Konstantin Pastbin
2025-08-17 14:32:37 +07:00
parent 9f0290c0ec
commit bfffa1fff4
2169 changed files with 56441 additions and 64188 deletions

View File

@@ -102,11 +102,9 @@ inline bool ReadVersion(fstream & f, uint32_t & version)
return f.good();
}
} // namespace
} // namespace
GpsTrackStorage::GpsTrackStorage(string const & filePath)
: m_filePath(filePath)
, m_itemCount(0)
GpsTrackStorage::GpsTrackStorage(string const & filePath) : m_filePath(filePath), m_itemCount(0)
{
auto const createNewFile = [this]
{
@@ -121,7 +119,6 @@ GpsTrackStorage::GpsTrackStorage(string const & filePath)
m_itemCount = 0;
};
// Open existing file
m_stream.open(m_filePath, ios::in | ios::out | ios::binary);
@@ -175,8 +172,7 @@ void GpsTrackStorage::Append(vector<TItem> const & items)
return;
// Write position must be after last item position
ASSERT_EQUAL(m_stream.tellp(), static_cast<typename fstream::pos_type>(
GetItemOffset(m_itemCount)), ());
ASSERT_EQUAL(m_stream.tellp(), static_cast<typename fstream::pos_type>(GetItemOffset(m_itemCount)), ());
vector<char> buff(min(kItemBlockSize, items.size()) * kPointSize);
for (size_t i = 0; i < items.size();)
@@ -217,8 +213,7 @@ void GpsTrackStorage::Clear()
MYTHROW(WriteException, ("File:", m_filePath));
// Write position is set to the first item in the file
ASSERT_EQUAL(m_stream.tellp(), static_cast<typename fstream::pos_type>(
GetItemOffset(0)), ());
ASSERT_EQUAL(m_stream.tellp(), static_cast<typename fstream::pos_type>(GetItemOffset(0)), ());
}
void GpsTrackStorage::ForEach(std::function<bool(TItem const & item)> const & fn)