Remove clear() method
This commit is contained in:
@@ -26,8 +26,6 @@ public:
|
||||
|
||||
std::string get(const StringIdentity id);
|
||||
|
||||
void clear();
|
||||
|
||||
size_t size();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -67,14 +67,6 @@ std::string StringIndexer::get(const StringIdentity id) {
|
||||
return id < identityToString.size() ? (buffer.data() + identityToString[id]) : empty;
|
||||
}
|
||||
|
||||
void StringIndexer::clear() {
|
||||
std::unique_lock<std::shared_mutex> writerLock(sharedMutex);
|
||||
|
||||
stringToIdentity.clear();
|
||||
identityToString.clear();
|
||||
buffer.clear();
|
||||
}
|
||||
|
||||
size_t StringIndexer::size() {
|
||||
std::shared_lock<std::shared_mutex> readerLock(sharedMutex);
|
||||
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
using namespace mbgl;
|
||||
|
||||
TEST(StringIndexer, SingletonStringIndexer) {
|
||||
EXPECT_GE(stringIndexer().size(), 0);
|
||||
}
|
||||
|
||||
TEST(StringIndexer, AddStrings) {
|
||||
StringIndexer strIndexer;
|
||||
EXPECT_EQ(strIndexer.size(), 0);
|
||||
|
||||
Reference in New Issue
Block a user