diff options
Diffstat (limited to 'Swift/Controllers/PreviousStatusStore.cpp')
-rw-r--r-- | Swift/Controllers/PreviousStatusStore.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Swift/Controllers/PreviousStatusStore.cpp b/Swift/Controllers/PreviousStatusStore.cpp index 271658f..947cdc7 100644 --- a/Swift/Controllers/PreviousStatusStore.cpp +++ b/Swift/Controllers/PreviousStatusStore.cpp @@ -18,25 +18,25 @@ PreviousStatusStore::~PreviousStatusStore() { } -void PreviousStatusStore::addStatus(StatusShow::Type status, const String& message) { +void PreviousStatusStore::addStatus(StatusShow::Type status, const std::string& message) { //FIXME: remove old entries store_.push_back(TypeStringPair(status, message)); } -std::vector<TypeStringPair> PreviousStatusStore::exactMatchSuggestions(StatusShow::Type status, const String& message) { +std::vector<TypeStringPair> PreviousStatusStore::exactMatchSuggestions(StatusShow::Type status, const std::string& message) { std::vector<TypeStringPair> suggestions; suggestions.push_back(TypeStringPair(status, message)); return suggestions; } -std::vector<TypeStringPair> PreviousStatusStore::getSuggestions(const String& message) { +std::vector<TypeStringPair> PreviousStatusStore::getSuggestions(const std::string& message) { std::vector<TypeStringPair> suggestions; foreach (TypeStringPair status, store_) { if (status.second == message) { suggestions.clear(); suggestions.push_back(status); break; - } else if (status.second.contains(message)) { + } else if (status.second.find(message) != std::string::npos) { suggestions.push_back(status); } } |