示例#1
0
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);
	}
}
示例#2
0
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);
  }
}