Code Cleanup

- The 'diagnostics' command no longer generates 1000 UUIDs as a uniqueness
  test, because libuuid is now mandatory.
This commit is contained in:
Paul Beckingham 2013-09-10 23:16:03 -04:00
parent 89d1bfefe3
commit f7a6d07d71
2 changed files with 2 additions and 18 deletions

2
NEWS
View file

@ -32,6 +32,8 @@ Newly deprecated features in taskwarrior 2.3.0
- The 'push', 'pull' and 'merge' commands will be removed in a subsequent - The 'push', 'pull' and 'merge' commands will be removed in a subsequent
release. The new 'sync' command, in conjunction with the Task Server is the release. The new 'sync' command, in conjunction with the Task Server is the
new sync mechanism. new sync mechanism.
- The 'diagnostics' command no longer generates 1000 UUIDs as a uniqueness
test, because libuuid is now mandatory.
--- ---

View file

@ -300,24 +300,6 @@ int CmdDiagnostics::execute (std::string& output)
out << bold.colorize (STRING_CMD_DIAG_TESTS) out << bold.colorize (STRING_CMD_DIAG_TESTS)
<< "\n"; << "\n";
{ {
out << " UUID gen: ";
std::vector <std::string> uuids;
std::string id;
for (int i = 0; i < 1000; i++)
{
id = uuid ();
if (std::find (uuids.begin (), uuids.end (), id) != uuids.end ())
{
out << format (STRING_CMD_DIAG_UUID_BAD, i) << "\n";
break;
}
else
uuids.push_back (id);
}
if (uuids.size () >= 1000)
out << STRING_CMD_DIAG_UUID_GOOD << "\n";
// Determine terminal details. // Determine terminal details.
const char* term = getenv ("TERM"); const char* term = getenv ("TERM");
out << " $TERM: " out << " $TERM: "