mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Revert "[cl;ang-tidy] Don't initialize strings"
This reverts commit 426e067f43
.
This commit is contained in:
parent
3eb209f248
commit
9016c26828
4 changed files with 10 additions and 10 deletions
|
@ -36,7 +36,7 @@
|
||||||
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
|
static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
|
||||||
static const unsigned int uuid_min_length = 8;
|
static const unsigned int uuid_min_length = 8;
|
||||||
|
|
||||||
std::string Lexer::dateFormat;
|
std::string Lexer::dateFormat = "";
|
||||||
std::string::size_type Lexer::minimumMatchLength = 3;
|
std::string::size_type Lexer::minimumMatchLength = 3;
|
||||||
std::map <std::string, std::string> Lexer::attributes;
|
std::map <std::string, std::string> Lexer::attributes;
|
||||||
|
|
||||||
|
|
10
src/Task.cpp
10
src/Task.cpp
|
@ -65,9 +65,9 @@ extern Task& contextTask;
|
||||||
static const float epsilon = 0.000001;
|
static const float epsilon = 0.000001;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::string Task::defaultProject;
|
std::string Task::defaultProject = "";
|
||||||
std::string Task::defaultDue;
|
std::string Task::defaultDue = "";
|
||||||
std::string Task::defaultScheduled;
|
std::string Task::defaultScheduled = "";
|
||||||
bool Task::searchCaseSensitive = true;
|
bool Task::searchCaseSensitive = true;
|
||||||
bool Task::regex = false;
|
bool Task::regex = false;
|
||||||
std::map <std::string, std::string> Task::attributes;
|
std::map <std::string, std::string> Task::attributes;
|
||||||
|
@ -87,7 +87,7 @@ float Task::urgencyAgeMax = 0.0;
|
||||||
|
|
||||||
std::map <std::string, std::vector <std::string>> Task::customOrder;
|
std::map <std::string, std::vector <std::string>> Task::customOrder;
|
||||||
|
|
||||||
static const std::string dummy;
|
static const std::string dummy ("");
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// The uuid and id attributes must be exempt from comparison.
|
// The uuid and id attributes must be exempt from comparison.
|
||||||
|
@ -2062,7 +2062,7 @@ void Task::modify (modType type, bool text_required /* = false */)
|
||||||
// Need this for later comparison.
|
// Need this for later comparison.
|
||||||
auto originalStatus = getStatus ();
|
auto originalStatus = getStatus ();
|
||||||
|
|
||||||
std::string text;
|
std::string text = "";
|
||||||
bool mods = false;
|
bool mods = false;
|
||||||
for (auto& a : Context::getContext ().cli2._args)
|
for (auto& a : Context::getContext ().cli2._args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -89,7 +89,7 @@
|
||||||
#define STRING_VARIANT_MOD_ZERO "Cannot modulo zero"
|
#define STRING_VARIANT_MOD_ZERO "Cannot modulo zero"
|
||||||
#define STRING_VARIANT_SQRT_NEG "Cannot take the square root of a negative number."
|
#define STRING_VARIANT_SQRT_NEG "Cannot take the square root of a negative number."
|
||||||
|
|
||||||
std::string Variant::dateFormat;
|
std::string Variant::dateFormat = "";
|
||||||
bool Variant::searchCaseSensitive = true;
|
bool Variant::searchCaseSensitive = true;
|
||||||
bool Variant::searchUsingRegex = true;
|
bool Variant::searchUsingRegex = true;
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ int confirm4 (const std::string& question)
|
||||||
<< options[5]
|
<< options[5]
|
||||||
<< ") ";
|
<< ") ";
|
||||||
|
|
||||||
std::string answer;
|
std::string answer {""};
|
||||||
std::getline (std::cin, answer);
|
std::getline (std::cin, answer);
|
||||||
Context::getContext ().debug ("STDIN '" + answer + '\'');
|
Context::getContext ().debug ("STDIN '" + answer + '\'');
|
||||||
answer = std::cin.eof () ? STRING_UTIL_CONFIRM_QUIT : Lexer::lowerCase (Lexer::trim (answer));
|
answer = std::cin.eof () ? STRING_UTIL_CONFIRM_QUIT : Lexer::lowerCase (Lexer::trim (answer));
|
||||||
|
@ -204,7 +204,7 @@ const std::string indentProject (
|
||||||
char delimiter /* = '.' */)
|
char delimiter /* = '.' */)
|
||||||
{
|
{
|
||||||
// Count the delimiters in *i.
|
// Count the delimiters in *i.
|
||||||
std::string prefix;
|
std::string prefix = "";
|
||||||
std::string::size_type pos = 0;
|
std::string::size_type pos = 0;
|
||||||
std::string::size_type lastpos = 0;
|
std::string::size_type lastpos = 0;
|
||||||
while ((pos = project.find (delimiter, pos + 1)) != std::string::npos)
|
while ((pos = project.find (delimiter, pos + 1)) != std::string::npos)
|
||||||
|
@ -216,7 +216,7 @@ const std::string indentProject (
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string child;
|
std::string child = "";
|
||||||
if (lastpos == 0)
|
if (lastpos == 0)
|
||||||
child = project;
|
child = project;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue