Use anonymous namespace

This commit is contained in:
Andrew Noyes 2021-04-19 20:32:49 +00:00
parent b75e25e012
commit 7182289abb
2 changed files with 7 additions and 2 deletions

View File

@ -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 {

View File

@ -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;