mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-06 05:27:24 +00:00
Fixed compile errors in VS / gcc for recent commits.
Tested: on Windows & Linux. Change-Id: I90e18c448fc2fafeb83a6cdc3776174479874562
This commit is contained in:
@@ -138,7 +138,7 @@ inline void EnsureDirExists(const std::string &filepath) {
|
||||
auto parent = StripFileName(filepath);
|
||||
if (parent.length()) EnsureDirExists(parent);
|
||||
#ifdef _WIN32
|
||||
_mkdir(filepath.c_str())
|
||||
_mkdir(filepath.c_str());
|
||||
#else
|
||||
mkdir(filepath.c_str(), S_IRWXU|S_IRGRP|S_IXGRP);
|
||||
#endif
|
||||
@@ -154,7 +154,7 @@ inline int ToUTF8(uint32_t ucc, std::string *out) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
// Max bits this encoding can represent.
|
||||
uint32_t max_bits = 6 + i * 5 + static_cast<int>(!i);
|
||||
if (ucc < (1 << max_bits)) { // does it fit?
|
||||
if (ucc < (1u << max_bits)) { // does it fit?
|
||||
// Remaining bits not encoded in the first byte, store 6 bits each
|
||||
uint32_t remain_bits = i * 6;
|
||||
// Store first byte:
|
||||
|
||||
Reference in New Issue
Block a user