Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compiled/StringMap.h

Issue 29613616: Issue 6064 - Put C++ code into a configurable namespace (Closed) Base URL: https://github.com/adblockplus/adblockpluscore.git
Patch Set: rebase Created Feb. 6, 2018, 9:54 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « compiled/String.h ('k') | compiled/StringScanner.h » ('j') | compiled/base.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compiled/StringMap.h
diff --git a/compiled/StringMap.h b/compiled/StringMap.h
index 0260d974051bc1d85ab98fdd54acc1593c5a7972..1b09b0dd343ce326780d979ee735f49fdd1fc99b 100644
--- a/compiled/StringMap.h
+++ b/compiled/StringMap.h
@@ -19,11 +19,14 @@
#include <cstddef>
+#include "base.h"
#include "Map.h"
#include "String.h"
-namespace {
- size_t stringHash(const String& key)
+ABP_NS_BEGIN
+namespace StringMap_internal
sergei 2018/02/06 10:03:17 here is actually an unrelated change, we are norma
+{
+ inline size_t stringHash(const String& key)
{
// FNV-1a hash function
size_t result = 2166136261;
@@ -37,7 +40,7 @@ struct StringHash
{
size_t operator()(const String& key) const
{
- return stringHash(key);
+ return StringMap_internal::stringHash(key);
}
};
@@ -113,3 +116,4 @@ template<typename Value>
using StringMap = Map<StringMap_internal::StringMapEntry<DependentString, Value>>;
template<typename Value>
using OwnedStringMap = Map<StringMap_internal::StringMapEntry<OwnedString, Value>>;
+ABP_NS_END
« no previous file with comments | « compiled/String.h ('k') | compiled/StringScanner.h » ('j') | compiled/base.h » ('J')

Powered by Google App Engine
This is Rietveld