Skip to content

Commit 575326a

Browse files
committed
Fixed typo BIGENDIAN -> BIG_ENDIAN
1 parent 58ee8f5 commit 575326a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/builder.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,13 @@ util::Status Builder::GetPrecompiledCharsMap(absl::string_view name,
293293
return util::OkStatus();
294294
}
295295

296+
if (!std::all_of(name.begin(), name.end(), [](auto c) {
297+
return (c >= 'a' && c <= 'z') || c == '_' || c == '-';
298+
})) {
299+
return util::StatusBuilder(util::StatusCode::kInvalidArgument, GTL_LOC)
300+
<< "Invalid charsmap name " << name;
301+
}
302+
296303
std::string result;
297304

298305
#ifndef DISABLE_EMBEDDED_DATA

src/common.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ inline uint32_t Swap32(uint32_t x) {
7474
} // namespace util
7575

7676
constexpr bool is_bigendian() {
77-
#ifdef IS_BIGENDIAN
77+
#ifdef IS_BIG_ENDIAN
7878
return true;
79-
#else // IS_BIGENDIAN
79+
#else // IS_BIG_ENDIAN
8080
return false;
81-
#endif // IS_BIGENDIAN
81+
#endif // IS_BIG_ENDIAN
8282
}
8383

8484
namespace error {

0 commit comments

Comments
 (0)