mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-09 18:50:39 +02:00
Cleanup: Don't use string literals when character literals are needed
This commit is contained in:
parent
5403675100
commit
95f4989f77
58 changed files with 372 additions and 374 deletions
|
@ -64,12 +64,12 @@ int CmdImport::execute (std::string&)
|
|||
std::vector <std::string> words = context.cli2.getWords ();
|
||||
if (! words.size () || (words.size () == 1 && words[0] == "-"))
|
||||
{
|
||||
std::cout << format (STRING_CMD_IMPORT_FILE, "STDIN") << "\n";
|
||||
std::cout << format (STRING_CMD_IMPORT_FILE, "STDIN") << '\n';
|
||||
|
||||
std::string json;
|
||||
std::string line;
|
||||
while (std::getline (std::cin, line))
|
||||
json += line + "\n";
|
||||
json += line + '\n';
|
||||
|
||||
if (nontrivial (json))
|
||||
count = import (json);
|
||||
|
@ -83,7 +83,7 @@ int CmdImport::execute (std::string&)
|
|||
if (! incoming.exists ())
|
||||
throw format (STRING_CMD_IMPORT_MISSING, word);
|
||||
|
||||
std::cout << format (STRING_CMD_IMPORT_FILE, word) << "\n";
|
||||
std::cout << format (STRING_CMD_IMPORT_FILE, word) << '\n';
|
||||
|
||||
// Load the file.
|
||||
std::string json;
|
||||
|
@ -224,9 +224,9 @@ void CmdImport::importSingleTask (json::object* obj)
|
|||
}
|
||||
|
||||
std::cout << task.get ("uuid")
|
||||
<< " "
|
||||
<< ' '
|
||||
<< task.get ("description")
|
||||
<< "\n";
|
||||
<< '\n';
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue