mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- The 'diagnostics' command no longer generates 1000 UUIDs as a uniqueness test, because libuuid is now mandatory.
This commit is contained in:
parent
89d1bfefe3
commit
f7a6d07d71
2 changed files with 2 additions and 18 deletions
|
@ -300,24 +300,6 @@ int CmdDiagnostics::execute (std::string& output)
|
|||
out << bold.colorize (STRING_CMD_DIAG_TESTS)
|
||||
<< "\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.
|
||||
const char* term = getenv ("TERM");
|
||||
out << " $TERM: "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue