mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed unnecessary use of the scope resolution operator.
This commit is contained in:
parent
3214dc5d37
commit
fbb217538e
18 changed files with 75 additions and 75 deletions
14
src/Att.cpp
14
src/Att.cpp
|
@ -562,20 +562,20 @@ bool Att::match (const Att& other) const
|
|||
if (which == "duration")
|
||||
{
|
||||
Duration literal (mValue);
|
||||
Duration variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Duration variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (!(variable < literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "date")
|
||||
{
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
|
||||
Date variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Date variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (other.mValue == "" || ! (variable < literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "number")
|
||||
{
|
||||
if (::atoi (mValue.c_str ()) >= ::atoi (other.mValue.c_str ()))
|
||||
if (atoi (mValue.c_str ()) >= atoi (other.mValue.c_str ()))
|
||||
return false;
|
||||
}
|
||||
else if (which == "text")
|
||||
|
@ -592,20 +592,20 @@ bool Att::match (const Att& other) const
|
|||
if (which == "duration")
|
||||
{
|
||||
Duration literal (mValue);
|
||||
Duration variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Duration variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (! (variable > literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "date")
|
||||
{
|
||||
Date literal (mValue.c_str (), context.config.get ("dateformat", "m/d/Y"));
|
||||
Date variable ((time_t)::atoi (other.mValue.c_str ()));
|
||||
Date variable ((time_t)atoi (other.mValue.c_str ()));
|
||||
if (! (variable > literal))
|
||||
return false;
|
||||
}
|
||||
else if (which == "number")
|
||||
{
|
||||
if (::atoi (mValue.c_str ()) <= ::atoi (other.mValue.c_str ()))
|
||||
if (atoi (mValue.c_str ()) <= atoi (other.mValue.c_str ()))
|
||||
return false;
|
||||
}
|
||||
else if (which == "text")
|
||||
|
@ -678,7 +678,7 @@ void Att::value (const std::string& value)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int Att::value_int () const
|
||||
{
|
||||
return ::atoi (mValue.c_str ());
|
||||
return atoi (mValue.c_str ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue