diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-06-21 11:12:34 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-06-21 11:12:34 +0000 |
commit | 06819dff1225548ad1df3191c2bc4e8816271cf7 (patch) | |
tree | 5fca678c28510c8209c9837b9810a870dc12a949 /vespalib | |
parent | e8d78b17f19c8fada6f66effc463305651a71197 (diff) |
too_big => throw_too_big
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/util/compress.cpp | 8 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/util/compress.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/vespalib/src/vespa/vespalib/util/compress.cpp b/vespalib/src/vespa/vespalib/util/compress.cpp index 75bb9bb8f40..74e7901b74a 100644 --- a/vespalib/src/vespa/vespalib/util/compress.cpp +++ b/vespalib/src/vespa/vespalib/util/compress.cpp @@ -24,18 +24,18 @@ size_t Integer::compressPositive(uint64_t n, void *destination) d[3] = n & 0xff; return 4; } else { - too_big(n); + throw_too_big(n); } } void -Integer::too_big(int64_t n) { +Integer::throw_too_big(int64_t n) { throw IllegalArgumentException(make_string("Number '%" PRId64 "' too big, must extend encoding", n)); } void -Integer::too_big(uint64_t n) { +Integer::throw_too_big(uint64_t n) { throw IllegalArgumentException(make_string("Number '%" PRIu64 "' too big, must extend encoding", n)); } @@ -60,7 +60,7 @@ size_t Integer::compress(int64_t n, void *destination) d[3] = n & 0xff; return 4; } else { - too_big(negative ? -n : n); + throw_too_big(negative ? -n : n); } } diff --git a/vespalib/src/vespa/vespalib/util/compress.h b/vespalib/src/vespa/vespalib/util/compress.h index 880ca268f28..c525e186103 100644 --- a/vespalib/src/vespa/vespalib/util/compress.h +++ b/vespalib/src/vespa/vespalib/util/compress.h @@ -35,7 +35,7 @@ public: } else if ( n < (0x1 << 30)) { return 4; } else { - too_big(n); + throw_too_big(n); } } /** @@ -53,7 +53,7 @@ public: } else if ( n < (0x1 << 29)) { return 4; } else { - too_big(n); + throw_too_big(n); } } /** @@ -106,8 +106,8 @@ public: return numbytes; } private: - [[ noreturn ]] static void too_big(int64_t n); - [[ noreturn ]] static void too_big(uint64_t n); + [[ noreturn ]] static void throw_too_big(int64_t n); + [[ noreturn ]] static void throw_too_big(uint64_t n); }; } |