mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-23 03:47:34 -04:00
Replace StringUtils::format in components/detournavigator
This commit is contained in:
parent
2b7f775ffe
commit
a0d081adb9
@ -10,7 +10,6 @@
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/loadinglistener/loadinglistener.hpp>
|
||||
#include <components/misc/strings/conversion.hpp>
|
||||
#include <components/misc/strings/format.hpp>
|
||||
#include <components/misc/thread.hpp>
|
||||
|
||||
#include <DetourNavMesh.h>
|
||||
@ -20,6 +19,7 @@
|
||||
#include <boost/geometry.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
#include <format>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <tuple>
|
||||
@ -78,7 +78,7 @@ namespace DetourNavigator
|
||||
|
||||
std::string makeRevision(const Version& version)
|
||||
{
|
||||
return Misc::StringUtils::format(".%zu.%zu", version.mGeneration, version.mRevision);
|
||||
return std::format(".{}.{}", version.mGeneration, version.mRevision);
|
||||
}
|
||||
|
||||
void writeDebugRecastMesh(
|
||||
@ -90,9 +90,8 @@ namespace DetourNavigator
|
||||
if (settings.mEnableRecastMeshFileNameRevision)
|
||||
revision = makeRevision(recastMesh.getVersion());
|
||||
writeToFile(recastMesh,
|
||||
Misc::StringUtils::format(
|
||||
"%s%d.%d.", settings.mRecastMeshPathPrefix, tilePosition.x(), tilePosition.y()),
|
||||
revision, settings.mRecast);
|
||||
std::format("{}{}.{}.", settings.mRecastMeshPathPrefix, tilePosition.x(), tilePosition.y()), revision,
|
||||
settings.mRecast);
|
||||
}
|
||||
|
||||
void writeDebugNavMesh(
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#include <components/debug/debuglog.hpp>
|
||||
#include <components/misc/compression.hpp>
|
||||
#include <components/misc/strings/format.hpp>
|
||||
#include <components/sqlite3/db.hpp>
|
||||
#include <components/sqlite3/request.hpp>
|
||||
|
||||
@ -11,6 +10,7 @@
|
||||
#include <sqlite3.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <format>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
|
||||
@ -148,7 +148,7 @@ namespace DetourNavigator
|
||||
|
||||
void setMaxPageCount(sqlite3& db, std::uint64_t value)
|
||||
{
|
||||
const auto query = Misc::StringUtils::format("pragma max_page_count = %lu;", value);
|
||||
const auto query = std::format("pragma max_page_count = {};", value);
|
||||
if (const int ec = sqlite3_exec(&db, query.c_str(), nullptr, nullptr, nullptr); ec != SQLITE_OK)
|
||||
throw std::runtime_error("Failed set max page count: " + std::string(sqlite3_errmsg(&db)));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user