Merge pull request #307 from jherico/android_64

Fixing Android ArmV8/Clang/LibC++ build
This commit is contained in:
FrankGalligan 2017-12-22 14:21:51 -08:00 committed by GitHub
commit fb5ed8ebf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -78,7 +78,9 @@ void Options::SetVector(const std::string &name, const DataTypeT *vec,
for (int i = 0; i < num_dims; ++i) {
if (i > 0)
out += " ";
#ifdef ANDROID
// GNU STL on android doesn't include a proper std::to_string, but the libc++ version does
#if defined(ANDROID) && !defined(_LIBCPP_VERSION)
out += to_string(vec[i]);
#else
out += std::to_string(vec[i]);

View File

@ -54,7 +54,7 @@ Status ObjDecoder::DecodeFromFile(const std::string &file_name,
if (!file)
return Status(Status::IO_ERROR);
// Read the whole file into a buffer.
int64_t file_size = file.tellg();
auto file_size = file.tellg();
file.seekg(0, std::ios::end);
file_size = file.tellg() - file_size;
if (file_size == 0)

View File

@ -34,7 +34,7 @@ bool PlyDecoder::DecodeFromFile(const std::string &file_name,
if (!file)
return false;
// Read the whole file into a buffer.
int64_t file_size = file.tellg();
auto file_size = file.tellg();
file.seekg(0, std::ios::end);
file_size = file.tellg() - file_size;
if (file_size == 0)