mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
change std::snprintf to snprintf for android compile
This commit is contained in:
parent
94f661bf3c
commit
6791d6ebf2
|
@ -9795,11 +9795,11 @@ namespace sol {
|
|||
// std::to_string doesn't exist in android still, with NDK, so this bullshit
|
||||
// is necessary
|
||||
// thanks, Android :v
|
||||
int appended = std::snprintf(nullptr, 0, "%d", uniqueness);
|
||||
int appended = snprintf(nullptr, 0, "%d", uniqueness);
|
||||
std::size_t insertionpoint = uniquegcmetakey.length() - 1;
|
||||
uniquegcmetakey.append(appended, '\0');
|
||||
char* uniquetarget = &uniquegcmetakey[insertionpoint];
|
||||
std::snprintf(uniquetarget, uniquegcmetakey.length(), "%d", uniqueness);
|
||||
snprintf(uniquetarget, uniquegcmetakey.length(), "%d", uniqueness);
|
||||
++uniqueness;
|
||||
|
||||
const char* gcmetakey = &usertype_traits<T>::gc_table[0];
|
||||
|
|
|
@ -457,11 +457,11 @@ namespace sol {
|
|||
// std::to_string doesn't exist in android still, with NDK, so this bullshit
|
||||
// is necessary
|
||||
// thanks, Android :v
|
||||
int appended = std::snprintf(nullptr, 0, "%d", uniqueness);
|
||||
int appended = snprintf(nullptr, 0, "%d", uniqueness);
|
||||
std::size_t insertionpoint = uniquegcmetakey.length() - 1;
|
||||
uniquegcmetakey.append(appended, '\0');
|
||||
char* uniquetarget = &uniquegcmetakey[insertionpoint];
|
||||
std::snprintf(uniquetarget, uniquegcmetakey.length(), "%d", uniqueness);
|
||||
snprintf(uniquetarget, uniquegcmetakey.length(), "%d", uniqueness);
|
||||
++uniqueness;
|
||||
|
||||
const char* gcmetakey = &usertype_traits<T>::gc_table[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user