mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 19:03:07 +02:00
C++11: N2672 Initializer lists
- Modified code to use the more compact and readable initializer lists.
This commit is contained in:
parent
49f7612704
commit
7bbc794d3a
25 changed files with 136 additions and 231 deletions
|
|
@ -634,9 +634,7 @@ int main (int argc, char** argv)
|
|||
|
||||
// bool getOneOf (const std::vector <std::string>&, std::string&);
|
||||
t.diag ("Nibbler::getOneOf");
|
||||
options.push_back ("one");
|
||||
options.push_back ("two");
|
||||
options.push_back ("three");
|
||||
options = {"one", "two", "three"};
|
||||
n = Nibbler ("onetwothreefour");
|
||||
t.ok (n.getOneOf (options, s), "'onetwothreefour': getOneOf () -> true");
|
||||
t.is (s, "one", "'onetwothreefour': getOneOf () -> one");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue