mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 12:05:50 +00:00
Refactoring of idl_parser (#4948)
* Refactoring of numbers parser More accurate parse of float and double. Hexadecimal floats. Check "out-of-range" of uint64 fields. Check correctness of default values and metadata. * Remove locale-independent code strtod/strtof from PR #4948. * small optimization * Add is_(ascii) functions * is_ascii cleanup * Fix format conversation * Refine number parser * Make code compatible with Android build * Remove unnecessary suppression of warning C4127
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
53ce80ce91
commit
4ed6fafdfa
@@ -145,7 +145,7 @@ class CppGenerator : public BaseGenerator {
|
||||
std::string guard = file_name_;
|
||||
// Remove any non-alpha-numeric characters that may appear in a filename.
|
||||
struct IsAlnum {
|
||||
bool operator()(char c) const { return !isalnum(c); }
|
||||
bool operator()(char c) const { return !is_alnum(c); }
|
||||
};
|
||||
guard.erase(std::remove_if(guard.begin(), guard.end(), IsAlnum()),
|
||||
guard.end());
|
||||
|
||||
Reference in New Issue
Block a user