Made all C++ files clang-formatted.

Also added missing generated files.

Change-Id: Ifd22a643a08e3f2edfce92812ed57b87fc0e1875
This commit is contained in:
Wouter van Oortmerssen
2017-12-21 10:54:28 -08:00
parent 5d9930aa0d
commit 89711c9c47
43 changed files with 5850 additions and 5992 deletions

View File

@@ -57,6 +57,7 @@ bool FileExists(const char *name) {
}
bool DirExists(const char *name) {
// clang-format off
#ifdef _WIN32
#define flatbuffers_stat _stat
#define FLATBUFFERS_S_IFDIR _S_IFDIR
@@ -64,6 +65,7 @@ bool DirExists(const char *name) {
#define flatbuffers_stat stat
#define FLATBUFFERS_S_IFDIR S_IFDIR
#endif
// clang-format on
struct flatbuffers_stat file_info;
if (flatbuffers_stat(name, &file_info) != 0) return false;
return (file_info.st_mode & FLATBUFFERS_S_IFDIR) != 0;
@@ -78,8 +80,8 @@ LoadFileFunction SetLoadFileFunction(LoadFileFunction load_file_function) {
FileExistsFunction SetFileExistsFunction(
FileExistsFunction file_exists_function) {
FileExistsFunction previous_function = g_file_exists_function;
g_file_exists_function = file_exists_function ?
file_exists_function : FileExistsRaw;
g_file_exists_function =
file_exists_function ? file_exists_function : FileExistsRaw;
return previous_function;
}