This is an automated email from the ASF dual-hosted git repository.
wwbmmm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brpc.git
The following commit(s) were added to refs/heads/master by this push:
new 3527165b [FIX] fix compile on ubuntu18.04 + use anonymous namespace
for hardcode var (#2422)
3527165b is described below
commit 3527165b22b505b1abfee4502050ce4b31faa95b
Author: Simon Cho <[email protected]>
AuthorDate: Wed Oct 25 14:26:38 2023 +0800
[FIX] fix compile on ubuntu18.04 + use anonymous namespace for hardcode var
(#2422)
---
src/brpc/redis_command.cpp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/brpc/redis_command.cpp b/src/brpc/redis_command.cpp
index 82f79505..81b734be 100644
--- a/src/brpc/redis_command.cpp
+++ b/src/brpc/redis_command.cpp
@@ -15,15 +15,20 @@
// specific language governing permissions and limitations
// under the License.
+#include <limits>
#include "butil/logging.h"
#include "brpc/log.h"
#include "brpc/redis_command.h"
-namespace brpc {
+namespace {
const size_t CTX_WIDTH = 5;
+} // namespace
+
+namespace brpc {
+
// Much faster than snprintf(..., "%lu", d);
inline size_t AppendDecimal(char* outbuf, unsigned long d) {
char buf[24]; // enough for decimal 64-bit integers
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]