Small fixes to the core C++ FlatBuffers implementation.

- Ensured weak linkage with the version string is not used on Windows,
  especially cygwin (which throws a linker error).
- Avoided a VS debug error for taking the address of the first element
  of an empty vector.
- Made copy/assignment constructors for downward_vector and
  FlatBufferBuilder private, to avoid people unintentionally making
  expensive copies.
- Using the more correct _WIN32 instead of WIN32

Change-Id: I801b5c8b159e3721af6d1ef0978a3247ba168bab
Tested: on Windows (VS + Cygwin) and Linux.
This commit is contained in:
Wouter van Oortmerssen
2014-07-15 16:27:44 -07:00
parent 74d5f3701f
commit 9143a93312
2 changed files with 18 additions and 11 deletions

View File

@@ -106,7 +106,7 @@ std::string StripExtension(const std::string &filename) {
std::string StripPath(const std::string &filename) {
size_t i = filename.find_last_of(
#ifdef WIN32
#ifdef _WIN32
"\\:"
#else
"/"