mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed unused util.cpp combine function.
This commit is contained in:
parent
4aa79dccfa
commit
bffc7a2ac8
3 changed files with 1 additions and 54 deletions
23
src/util.cpp
23
src/util.cpp
|
@ -259,29 +259,6 @@ int flock (int fd, int operation)
|
|||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void combine (std::vector <int>& dest, const std::vector <int>& source)
|
||||
{
|
||||
// Create a map using the sequence elements as keys. This will create a
|
||||
// unique list, with no duplicates.
|
||||
std::map <int, int> both;
|
||||
std::vector <int>::iterator i1;
|
||||
for (i1 = dest.begin (); i1 != dest.end (); ++i1)
|
||||
both[*i1] = 0;
|
||||
|
||||
std::vector <int>::const_iterator i2;
|
||||
for (i2 = source.begin (); i2 != source.end (); ++i2)
|
||||
both[*i2] = 0;
|
||||
|
||||
// Now make a sequence out of the keys of the map.
|
||||
dest.clear ();
|
||||
std::map <int, int>::iterator i3;
|
||||
for (i3 = both.begin (); i3 != both.end (); ++i3)
|
||||
dest.push_back (i3->first);
|
||||
|
||||
std::sort (dest.begin (), dest.end ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Run a binary with args, capturing output.
|
||||
int execute (
|
||||
|
|
|
@ -61,11 +61,8 @@ int execute (const std::string&, const std::vector <std::string>&, const std::st
|
|||
int flock (int, int);
|
||||
#endif
|
||||
|
||||
void combine (std::vector <int>&, const std::vector <int>&);
|
||||
|
||||
const std::string encode (const std::string&);
|
||||
const std::string decode (const std::string&);
|
||||
|
||||
const std::string escape (const std::string&, char);
|
||||
|
||||
const std::vector<std::string> indentTree (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue