mirror of
https://github.com/aimrebirth/tools.git
synced 2026-04-15 01:43:25 +00:00
[db] Prepare strings as utf-8.
This commit is contained in:
parent
8fdac09842
commit
217ba181c0
1 changed files with 3 additions and 3 deletions
|
|
@ -149,9 +149,9 @@ void db::open(const path &p)
|
||||||
|
|
||||||
polygon4::tools::db::processed_db db::process() const
|
polygon4::tools::db::processed_db db::process() const
|
||||||
{
|
{
|
||||||
auto process_string = [](const auto &s)
|
auto process_string = [](const std::string &s)
|
||||||
{
|
{
|
||||||
return str2utf8(s);
|
return str2utf8(s.c_str());
|
||||||
};
|
};
|
||||||
|
|
||||||
polygon4::tools::db::processed_db pdb;
|
polygon4::tools::db::processed_db pdb;
|
||||||
|
|
@ -170,7 +170,7 @@ polygon4::tools::db::processed_db db::process() const
|
||||||
switch (fld->second.type)
|
switch (fld->second.type)
|
||||||
{
|
{
|
||||||
case FieldType::String:
|
case FieldType::String:
|
||||||
r[name] = process_string(f.s.c_str());
|
r[name] = process_string(f.s);
|
||||||
break;
|
break;
|
||||||
case FieldType::Integer:
|
case FieldType::Integer:
|
||||||
r[name] = f.i;
|
r[name] = f.i;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue