mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 01:13:40 +00:00
Added Vaca::convert_to<std::string>(int).
This commit is contained in:
parent
2a65c24f74
commit
263c9d4e6e
5
third_party/vaca/include/Vaca/String.h
vendored
5
third_party/vaca/include/Vaca/String.h
vendored
@ -82,7 +82,10 @@ namespace Vaca {
|
||||
return convert_to<std::string, const Char*>(from);
|
||||
}
|
||||
|
||||
// Convert to String
|
||||
// Convert to std::string
|
||||
template<> VACA_DLL std::string convert_to(const int& from);
|
||||
|
||||
// Convert to std::wstring
|
||||
template<> VACA_DLL String convert_to(const std::string& from);
|
||||
template<> VACA_DLL String convert_to(const int& from);
|
||||
template<> VACA_DLL String convert_to(const long& from);
|
||||
|
7
third_party/vaca/src/String.cpp
vendored
7
third_party/vaca/src/String.cpp
vendored
@ -195,7 +195,12 @@ template<> double Vaca::convert_to(const String& from)
|
||||
return std::wcstod(from.c_str(), NULL);
|
||||
}
|
||||
|
||||
template<> String Vaca::convert_to(const int& from)
|
||||
template<> std::string Vaca::convert_to(const int& from)
|
||||
{
|
||||
return format_string("%d", from);
|
||||
}
|
||||
|
||||
template<> std::wstring Vaca::convert_to(const int& from)
|
||||
{
|
||||
return format_string(L"%d", from);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user