88 */
99
1010#include < ctime>
11- #include < format>
1211#include < memory>
1312#include < string>
1413
1716
1817#include < angles/angles.h>
1918#include < cras_cpp_common/expected.hpp>
19+ #include < cras_cpp_common/format.hpp>
2020#include < cras_cpp_common/string_utils.hpp>
2121#include < cras_cpp_common/time_utils.hpp>
2222#include < magnetic_model/magnetic_model.hpp>
@@ -79,7 +79,7 @@ MagneticModel::MagneticModel(
7979 }
8080 catch (const GeographicLib::GeographicErr& e)
8181 {
82- throw std::invalid_argument (std ::format (
82+ throw std::invalid_argument (cras ::format (
8383 " Could not create magnetic field model {} because of the following error: {}" , name.c_str (), e.what ()));
8484 }
8585
@@ -189,7 +189,7 @@ cras::expected<MagneticField, std::string> MagneticModel::getMagneticField(
189189 const auto maxYear = this ->data ->magneticModel ->MaxTime ();
190190 if (year < minYear || year > maxYear)
191191 {
192- const auto err = std ::format (" Using magnetic field model {} for an invalid year {}!" ,
192+ const auto err = cras ::format (" Using magnetic field model {} for an invalid year {}!" ,
193193 this ->data ->magneticModel ->MagneticModelName ().c_str (), std::to_string (year));
194194 if (this ->strict )
195195 {
@@ -206,7 +206,7 @@ cras::expected<MagneticField, std::string> MagneticModel::getMagneticField(
206206 const auto maxAlt = this ->data ->magneticModel ->MaxHeight ();
207207 if (fix.altitude < minAlt || fix.altitude > maxAlt)
208208 {
209- const auto err = std ::format (
209+ const auto err = cras ::format (
210210 " Using magnetic field model {} in altitude {} m which is outside the model range." ,
211211 this ->data ->magneticModel ->MagneticModelName ().c_str (), std::to_string (fix.altitude ));
212212 if (this ->strict )
@@ -259,7 +259,7 @@ cras::expected<MagneticFieldComponentProperties, std::string> MagneticModel::get
259259 const auto maxAlt = this ->data ->magneticModel ->MaxHeight ();
260260 if (fix.altitude < minAlt || fix.altitude > maxAlt)
261261 {
262- const auto err = std ::format (
262+ const auto err = cras ::format (
263263 " Using magnetic field model {} in altitude {} m which is outside the model range." ,
264264 this ->data ->magneticModel ->MagneticModelName ().c_str (), std::to_string (fix.altitude ));
265265 if (this ->strict )
@@ -304,7 +304,7 @@ cras::expected<MagneticFieldComponentProperties, std::string> MagneticModel::get
304304 const auto maxYear = this ->data ->magneticModel ->MaxTime ();
305305 if (year < minYear || year > maxYear)
306306 {
307- const auto err = std ::format (" Using magnetic field model {} for an invalid year {}!" ,
307+ const auto err = cras ::format (" Using magnetic field model {} for an invalid year {}!" ,
308308 this ->data ->magneticModel ->MagneticModelName ().c_str (), std::to_string (year));
309309 if (this ->strict )
310310 {
0 commit comments