Fix build.

This commit is contained in:
Maxim Pimenov 2017-02-15 12:05:30 +03:00
parent 4973685785
commit 330826519d
2 changed files with 18 additions and 1 deletions

18
search/utils.cpp Normal file
View file

@ -0,0 +1,18 @@
#include "search/utils.hpp"
#include <cctype>
namespace search
{
size_t GetMaxErrorsForToken(strings::UniString const & token)
{
bool const digitsOnly = std::all_of(token.begin(), token.end(), ::isdigit);
if (digitsOnly)
return 0;
if (token.size() < 4)
return 0;
if (token.size() < 8)
return 1;
return 2;
}
} // namespace search

View file

@ -12,7 +12,6 @@
#include "base/string_utils.hpp"
#include <algorithm>
#include <cctype>
#include <functional>
#include <queue>
#include <vector>