Multiple schemas parsed by flatc are now parsed independently.

It used to be such that later schemas could depend on earlier
schemas. This was a convenience from days before include files
were implemented. Nowadays they cause subtle bugs rather than being
useful, so this functionality has been removed.

You now need to explicitly include files you depend upon.

Change-Id: Id8292c3c621fc38fbd796da2d2cbdd63efc230d1
Tested: on Linux.
This commit is contained in:
Wouter van Oortmerssen
2015-11-30 16:42:48 -08:00
parent 1fa803d187
commit ac49eda053
5 changed files with 35 additions and 25 deletions

View File

@@ -174,6 +174,12 @@ inline std::string StripExtension(const std::string &filepath) {
return i != std::string::npos ? filepath.substr(0, i) : filepath;
}
// Returns the extension, if any.
inline std::string GetExtension(const std::string &filepath) {
size_t i = filepath.find_last_of(".");
return i != std::string::npos ? filepath.substr(i + 1) : "";
}
// Return the last component of the path, after the last separator.
inline std::string StripPath(const std::string &filepath) {
size_t i = filepath.find_last_of(PathSeparatorSet);