summaryrefslogtreecommitdiffstats
path: root/vespalib/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2022-06-21 11:12:34 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2022-06-21 11:12:34 +0000
commit06819dff1225548ad1df3191c2bc4e8816271cf7 (patch)
tree5fca678c28510c8209c9837b9810a870dc12a949 /vespalib/src
parente8d78b17f19c8fada6f66effc463305651a71197 (diff)
too_big => throw_too_big
Diffstat (limited to 'vespalib/src')
-rw-r--r--vespalib/src/vespa/vespalib/util/compress.cpp8
-rw-r--r--vespalib/src/vespa/vespalib/util/compress.h8
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);
};
}