diff --git a/src/Lexer.cpp b/src/Lexer.cpp index ae4fe0373..ad5e42eca 100644 --- a/src/Lexer.cpp +++ b/src/Lexer.cpp @@ -36,7 +36,7 @@ static const std::string uuid_pattern = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"; static const unsigned int uuid_min_length = 8; -std::string Lexer::dateFormat = ""; +std::string Lexer::dateFormat; std::string::size_type Lexer::minimumMatchLength = 3; std::map Lexer::attributes; diff --git a/src/Task.cpp b/src/Task.cpp index 922eac4ec..81c4cd57a 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -65,9 +65,9 @@ extern Task& contextTask; static const float epsilon = 0.000001; #endif -std::string Task::defaultProject = ""; -std::string Task::defaultDue = ""; -std::string Task::defaultScheduled = ""; +std::string Task::defaultProject; +std::string Task::defaultDue; +std::string Task::defaultScheduled; bool Task::searchCaseSensitive = true; bool Task::regex = false; std::map Task::attributes; @@ -87,7 +87,7 @@ float Task::urgencyAgeMax = 0.0; std::map > Task::customOrder; -static const std::string dummy (""); +static const std::string dummy; //////////////////////////////////////////////////////////////////////////////// // 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. auto originalStatus = getStatus (); - std::string text = ""; + std::string text; bool mods = false; for (auto& a : Context::getContext ().cli2._args) { diff --git a/src/Variant.cpp b/src/Variant.cpp index 55d9885d5..495282dce 100644 --- a/src/Variant.cpp +++ b/src/Variant.cpp @@ -89,7 +89,7 @@ #define STRING_VARIANT_MOD_ZERO "Cannot modulo zero" #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::searchUsingRegex = true; diff --git a/src/util.cpp b/src/util.cpp index 814f9aa61..01f83f043 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -103,7 +103,7 @@ int confirm4 (const std::string& question) << options[5] << ") "; - std::string answer {""}; + std::string answer; std::getline (std::cin, answer); Context::getContext ().debug ("STDIN '" + answer + '\''); answer = std::cin.eof () ? STRING_UTIL_CONFIRM_QUIT : Lexer::lowerCase (Lexer::trim (answer)); @@ -204,7 +204,7 @@ const std::string indentProject ( char delimiter /* = '.' */) { // Count the delimiters in *i. - std::string prefix = ""; + std::string prefix; std::string::size_type pos = 0; std::string::size_type lastpos = 0; 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) child = project; else