From 7182289abb0ebfb30ecb37288bd9e288f30b93ac Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 19 Apr 2021 20:32:49 +0000 Subject: [PATCH] Use anonymous namespace --- fdbserver/StorageCache.actor.cpp | 5 ++++- fdbserver/storageserver.actor.cpp | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fdbserver/StorageCache.actor.cpp b/fdbserver/StorageCache.actor.cpp index 73f6d0a245..b084f52896 100644 --- a/fdbserver/StorageCache.actor.cpp +++ b/fdbserver/StorageCache.actor.cpp @@ -42,8 +42,9 @@ // TODO storageCache server shares quite a bit of storageServer functionality, although simplified // Need to look into refactoring common code out for better code readability and to avoid duplication +namespace { // TODO rename wrong_shard_server error to wrong_cache_server -static inline bool canReplyWith(Error e) { +bool canReplyWith(Error e) { switch (e.code()) { case error_code_transaction_too_old: case error_code_future_version: @@ -56,6 +57,8 @@ static inline bool canReplyWith(Error e) { return false; }; } +} // namespace + class StorageCacheUpdater; struct AddingCacheRange : NonCopyable { diff --git a/fdbserver/storageserver.actor.cpp b/fdbserver/storageserver.actor.cpp index cadf5d36fb..833a90ed5e 100644 --- a/fdbserver/storageserver.actor.cpp +++ b/fdbserver/storageserver.actor.cpp @@ -72,7 +72,8 @@ #define SHORT_CIRCUT_ACTUAL_STORAGE 0 -static inline bool canReplyWith(Error e) { +namespace { +bool canReplyWith(Error e) { switch (e.code()) { case error_code_transaction_too_old: case error_code_future_version: @@ -85,6 +86,7 @@ static inline bool canReplyWith(Error e) { return false; }; } +} // namespace struct AddingShard : NonCopyable { KeyRange keys;