summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_string_pool_template.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-09-21 16:49:32 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-21 21:15:46 +0000
commit8e9e3d8975eeea3429c3b3ea703f04ac34e20e28 (patch)
treea426471d21ac8b6720b5b1657557b7016b85bddb /core/fxcrt/cfx_string_pool_template.h
parent20a1755a887c652d2f7057ab614b7a06ec492b97 (diff)
downloadpdfium-8e9e3d8975eeea3429c3b3ea703f04ac34e20e28.tar.xz
Move CFX_StringPoolTemplate to StringPoolTemplate
This CL moves CFX_StringPoolTemplate to StringPoolTemplate and places in the fxcrt namespace. Bug: pdfium:898 Change-Id: I41c8f23d6ad814d65cd154092143efaa630a96d1 Reviewed-on: https://pdfium-review.googlesource.com/14619 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_string_pool_template.h')
-rw-r--r--core/fxcrt/cfx_string_pool_template.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/core/fxcrt/cfx_string_pool_template.h b/core/fxcrt/cfx_string_pool_template.h
deleted file mode 100644
index b170a84127..0000000000
--- a/core/fxcrt/cfx_string_pool_template.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2016 PDFium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
-
-#ifndef CORE_FXCRT_CFX_STRING_POOL_TEMPLATE_H_
-#define CORE_FXCRT_CFX_STRING_POOL_TEMPLATE_H_
-
-#include <unordered_set>
-
-#include "core/fxcrt/fx_string.h"
-
-template <typename StringType>
-class CFX_StringPoolTemplate {
- public:
- StringType Intern(const StringType& str) { return *m_Pool.insert(str).first; }
- void Clear() { m_Pool.clear(); }
-
- private:
- std::unordered_set<StringType> m_Pool;
-};
-
-using ByteStringPool = CFX_StringPoolTemplate<ByteString>;
-using WideStringPool = CFX_StringPoolTemplate<WideString>;
-
-extern template class CFX_StringPoolTemplate<ByteString>;
-extern template class CFX_StringPoolTemplate<WideString>;
-
-#endif // CORE_FXCRT_CFX_STRING_POOL_TEMPLATE_H_