mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 04:53:36 +00:00
[coding] Rename non-empty string serialization.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
7b4862b442
commit
1d29e7816a
@@ -22,7 +22,7 @@ BoundaryPostcodesEnricher::BoundaryPostcodesEnricher(std::string const & boundar
|
||||
while (src.Size() > 0)
|
||||
{
|
||||
std::string postcode;
|
||||
utils::ReadString(src, postcode);
|
||||
rw::ReadNonEmpty(src, postcode);
|
||||
std::vector<m2::PointD> geometry;
|
||||
rw::ReadVectorOfPOD(src, geometry);
|
||||
CHECK(!postcode.empty() && !geometry.empty(), ());
|
||||
|
||||
@@ -57,7 +57,7 @@ void BoundaryPostcodeCollector::Save()
|
||||
FileWriter writer(GetFilename());
|
||||
for (auto const & p : m_data)
|
||||
{
|
||||
utils::WriteString(writer, p.first);
|
||||
rw::WriteNonEmpty(writer, p.first);
|
||||
rw::WriteVectorOfPOD(writer, p.second);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ unordered_map<string, vector<m2::PointD>> Read(string const & dumpFilename)
|
||||
while (src.Size() > 0)
|
||||
{
|
||||
string postcode;
|
||||
utils::ReadString(src, postcode);
|
||||
rw::ReadNonEmpty(src, postcode);
|
||||
vector<m2::PointD> geometry;
|
||||
rw::ReadVectorOfPOD(src, geometry);
|
||||
result.emplace(std::move(postcode), std::move(geometry));
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace routing
|
||||
@@ -74,7 +73,7 @@ void Save(Sink & sink, ConditionalRAVectorT const & ac)
|
||||
for (auto const & e : ac)
|
||||
{
|
||||
Save(sink, e.m_accessType);
|
||||
utils::WriteString(sink, e.m_openingHours);
|
||||
rw::WriteNonEmpty(sink, e.m_openingHours);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +85,7 @@ void Load(Source & src, ConditionalRAVectorT & vec)
|
||||
for (uint32_t i = 0; i < count; ++i)
|
||||
{
|
||||
Load(src, vec[i].m_accessType);
|
||||
utils::ReadString(src, vec[i].m_openingHours);
|
||||
rw::ReadNonEmpty(src, vec[i].m_openingHours);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user