Remove is_in_range utility function

This commit is contained in:
Maxime Coste 2015-03-09 22:37:42 +00:00
parent 7af8937bac
commit ea42d9dd4a
2 changed files with 2 additions and 8 deletions

View File

@ -295,8 +295,8 @@ void InsertCompleter::update()
ByteCoord cursor = m_context.selections().main().cursor(); ByteCoord cursor = m_context.selections().main().cursor();
ByteCoord compl_beg = m_completions.begin; ByteCoord compl_beg = m_completions.begin;
if (cursor.line == compl_beg.line and if (cursor.line == compl_beg.line and
is_in_range(cursor.column, compl_beg.column, compl_beg.column <= cursor.column and
compl_beg.column + longest_completion-1)) cursor.column < compl_beg.column + longest_completion)
{ {
String prefix = m_context.buffer().string(compl_beg, cursor); String prefix = m_context.buffer().string(compl_beg, cursor);

View File

@ -132,12 +132,6 @@ const T& clamp(const T& val, const T& min, const T& max)
return (val < min ? min : (val > max ? max : val)); return (val < min ? min : (val > max ? max : val));
} }
template<typename T>
bool is_in_range(const T& val, const T& min, const T& max)
{
return min <= val and val <= max;
}
} }
#endif // utils_hh_INCLUDED #endif // utils_hh_INCLUDED