diff --git a/src/draco/core/options.h b/src/draco/core/options.h index 204d825..650f0c9 100644 --- a/src/draco/core/options.h +++ b/src/draco/core/options.h @@ -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]); diff --git a/src/draco/io/obj_decoder.cc b/src/draco/io/obj_decoder.cc index cf9c030..1988583 100644 --- a/src/draco/io/obj_decoder.cc +++ b/src/draco/io/obj_decoder.cc @@ -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) diff --git a/src/draco/io/ply_decoder.cc b/src/draco/io/ply_decoder.cc index b3f5e4b..55f2759 100644 --- a/src/draco/io/ply_decoder.cc +++ b/src/draco/io/ply_decoder.cc @@ -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)