LineInfo::toString() -> LineInfo::to_string()
MODIFY
include/LineInfo.h
include/LineInfo.h
@@ -10,7 +10,7 @@ namespace vcpkg
constexpr LineInfo() : line_number(0), file_name(nullptr) {}
constexpr LineInfo(const int line_number, const char* file_name) : line_number(line_number), file_name(file_name) {}
- std::string toString() const;
+ std::string to_string() const;
};
}

MODIFY
src/LineInfo.cpp
src/LineInfo.cpp
namespace vcpkg
{
- std::string LineInfo::toString() const
+ std::string LineInfo::to_string() const
{
return Strings::format("%s(%d)", this->file_name, this->line_number);
}

MODIFY
src/vcpkg_Checks.cpp
src/vcpkg_Checks.cpp
@@ -9,7 +9,7 @@ namespace vcpkg::Checks
void unreachable(const LineInfo& line_info)
{
System::println(System::Color::error, "Error: Unreachable code was reached");
- System::println(System::Color::error, line_info.toString()); // Always print line_info here
+ System::println(System::Color::error, line_info.to_string()); // Always print line_info here
#ifndef NDEBUG
std::abort();
#else
@@ -22,7 +22,7 @@ namespace vcpkg::Checks
{
if (g_debugging)
{
- System::println(System::Color::error, line_info.toString());
+ System::println(System::Color::error, line_info.to_string());
}
::exit(exit_code);

LineInfo::toString() -> LineInfo::to_string()