mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancement - Sorting
- Replaced the hand-written combsort with std::sort. - Added exhaustive set of unit tests to cover the single and double column sort orders.
This commit is contained in:
parent
e34f278e1d
commit
da9985058b
4 changed files with 319 additions and 238 deletions
14
src/Grid.cpp
14
src/Grid.cpp
|
@ -369,15 +369,11 @@ Grid::Cell::operator std::string () const
|
|||
switch (mType)
|
||||
{
|
||||
case CELL_BOOL: return mBool ? "true" : "false"; // TODO i18n
|
||||
case CELL_CHAR: sprintf (s, "%c", mChar);
|
||||
return std::string (s);
|
||||
case CELL_INT: sprintf (s, "%d", mInt);
|
||||
return std::string (s);
|
||||
case CELL_FLOAT: sprintf (s, "%f", mFloat);
|
||||
return std::string (s);
|
||||
case CELL_DOUBLE: sprintf (s, "%f", mDouble);
|
||||
return std::string (s);
|
||||
case CELL_STRING: return mString;
|
||||
case CELL_CHAR: sprintf (s, "%c", mChar); return std::string (s);
|
||||
case CELL_INT: sprintf (s, "%d", mInt); return std::string (s);
|
||||
case CELL_FLOAT: sprintf (s, "%f", mFloat); return std::string (s);
|
||||
case CELL_DOUBLE: sprintf (s, "%f", mDouble); return std::string (s);
|
||||
case CELL_STRING: return mString;
|
||||
}
|
||||
|
||||
return std::string ("");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue