void LapeedTrends::increaseCount(std::string s, unsigned int amount) { const auto iterator = word_count.find(s); if (iterator == word_count.end()) { add_word(s, amount); } else { increment_word(s, amount, iterator); } }
void add_word(struct keys *kd, char *word) { int index = find_word_index(kd, word); if (index > -1) { increment_word(kd, word, index); } else { add_entry(kd, word); } }