mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-10 23:17:27 +00:00
Fix incorrect code generation on Solaris Sparc. (#5208)
On Solaris Sparc, calling NumToString() with a char called the primary version, not the signed char or unsigned char specializations, which caused integer to string conversions to be missed.
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
9bf9b18f0a
commit
6e2d530d61
@@ -130,6 +130,9 @@ template<> inline std::string NumToString<signed char>(signed char t) {
|
||||
template<> inline std::string NumToString<unsigned char>(unsigned char t) {
|
||||
return NumToString(static_cast<int>(t));
|
||||
}
|
||||
template<> inline std::string NumToString<char>(char t) {
|
||||
return NumToString(static_cast<int>(t));
|
||||
}
|
||||
#if defined(FLATBUFFERS_CPP98_STL)
|
||||
template<> inline std::string NumToString<long long>(long long t) {
|
||||
char buf[21]; // (log((1 << 63) - 1) / log(10)) + 2
|
||||
|
||||
Reference in New Issue
Block a user