mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
A3
- Removed obsolete ::find_limit method and _limit member.
This commit is contained in:
parent
3f8a723903
commit
562beac12b
2 changed files with 3 additions and 32 deletions
27
src/A3.cpp
27
src/A3.cpp
|
@ -119,7 +119,6 @@ const int safetyValveDefault = 10;
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
A3::A3 ()
|
A3::A3 ()
|
||||||
: _read_only_command (true)
|
: _read_only_command (true)
|
||||||
, _limit ("")
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +127,6 @@ A3::A3 (const A3& other)
|
||||||
{
|
{
|
||||||
std::vector <Arg>::operator= (other);
|
std::vector <Arg>::operator= (other);
|
||||||
_read_only_command = other._read_only_command;
|
_read_only_command = other._read_only_command;
|
||||||
_limit = other._limit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -136,7 +134,6 @@ A3& A3::operator= (const A3& other)
|
||||||
{
|
{
|
||||||
std::vector <Arg>::operator= (other);
|
std::vector <Arg>::operator= (other);
|
||||||
_read_only_command = other._read_only_command;
|
_read_only_command = other._read_only_command;
|
||||||
_limit = other._limit;
|
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
@ -518,12 +515,6 @@ bool A3::find_command (std::string& command) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
const std::string A3::find_limit () const
|
|
||||||
{
|
|
||||||
return _limit;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
const std::vector <std::string> A3::operator_list ()
|
const std::vector <std::string> A3::operator_list ()
|
||||||
{
|
{
|
||||||
|
@ -538,7 +529,6 @@ const std::vector <std::string> A3::operator_list ()
|
||||||
const A3 A3::extract_modifications () const
|
const A3 A3::extract_modifications () const
|
||||||
{
|
{
|
||||||
A3 mods;
|
A3 mods;
|
||||||
mods._limit = _limit;
|
|
||||||
|
|
||||||
bool before_command = true;
|
bool before_command = true;
|
||||||
std::vector <Arg>::const_iterator arg;
|
std::vector <Arg>::const_iterator arg;
|
||||||
|
@ -578,7 +568,6 @@ const A3 A3::extract_modifications () const
|
||||||
}
|
}
|
||||||
|
|
||||||
mods = tokenize (mods);
|
mods = tokenize (mods);
|
||||||
context.a3._limit = mods._limit;
|
|
||||||
return mods;
|
return mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -690,20 +679,11 @@ const A3 A3::tokenize (const A3& input) const
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (is_attr (n, new_arg))
|
else if (is_attr (n, new_arg))
|
||||||
{
|
|
||||||
// The "limit:xxx" attribute is not stored, but the value is retained.
|
|
||||||
if (new_arg._raw.length () > 6 &&
|
|
||||||
new_arg._raw.substr (0, 6) == "limit:")
|
|
||||||
{
|
|
||||||
output._limit = new_arg._raw.substr (6);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
output.push_back (new_arg);
|
output.push_back (new_arg);
|
||||||
if (found_sequence)
|
if (found_sequence)
|
||||||
found_something_after_sequence = true;
|
found_something_after_sequence = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
else if (is_attmod (n, new_arg))
|
else if (is_attmod (n, new_arg))
|
||||||
{
|
{
|
||||||
|
@ -798,10 +778,7 @@ const A3 A3::infix (const A3& input) const
|
||||||
return input;
|
return input;
|
||||||
|
|
||||||
Arg previous ("?", Arg::cat_op);
|
Arg previous ("?", Arg::cat_op);
|
||||||
|
|
||||||
A3 modified;
|
A3 modified;
|
||||||
modified._limit = input._limit;
|
|
||||||
|
|
||||||
std::vector <Arg>::const_iterator arg;
|
std::vector <Arg>::const_iterator arg;
|
||||||
for (arg = input.begin (); arg != input.end (); ++arg)
|
for (arg = input.begin (); arg != input.end (); ++arg)
|
||||||
{
|
{
|
||||||
|
@ -825,7 +802,6 @@ const A3 A3::infix (const A3& input) const
|
||||||
const A3 A3::expand (const A3& input) const
|
const A3 A3::expand (const A3& input) const
|
||||||
{
|
{
|
||||||
A3 expanded;
|
A3 expanded;
|
||||||
expanded._limit = input._limit;
|
|
||||||
|
|
||||||
std::vector <Arg>::const_iterator arg;
|
std::vector <Arg>::const_iterator arg;
|
||||||
std::vector <Arg>::const_iterator previous = input.begin ();
|
std::vector <Arg>::const_iterator previous = input.begin ();
|
||||||
|
@ -1021,7 +997,6 @@ const A3 A3::expand (const A3& input) const
|
||||||
const A3 A3::sequence (const A3& input) const
|
const A3 A3::sequence (const A3& input) const
|
||||||
{
|
{
|
||||||
A3 sequenced;
|
A3 sequenced;
|
||||||
sequenced._limit = input._limit;
|
|
||||||
|
|
||||||
// Extract all the components of a sequence.
|
// Extract all the components of a sequence.
|
||||||
std::vector <int> ids;
|
std::vector <int> ids;
|
||||||
|
@ -1141,8 +1116,6 @@ const A3 A3::postfix (const A3& input) const
|
||||||
return input;
|
return input;
|
||||||
|
|
||||||
A3 converted;
|
A3 converted;
|
||||||
converted._limit = input._limit;
|
|
||||||
|
|
||||||
A3 op_stack;
|
A3 op_stack;
|
||||||
char type;
|
char type;
|
||||||
int precedence;
|
int precedence;
|
||||||
|
|
2
src/A3.h
2
src/A3.h
|
@ -58,7 +58,6 @@ public:
|
||||||
const std::string combine () const;
|
const std::string combine () const;
|
||||||
const std::vector <std::string> list () const;
|
const std::vector <std::string> list () const;
|
||||||
bool find_command (std::string&) const;
|
bool find_command (std::string&) const;
|
||||||
const std::string find_limit () const;
|
|
||||||
|
|
||||||
const A3 extract_modifications () const;
|
const A3 extract_modifications () const;
|
||||||
|
|
||||||
|
@ -98,7 +97,6 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool _read_only_command;
|
bool _read_only_command;
|
||||||
std::string _limit;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue