Skip to content

Commit a08cd1e

Browse files
committed
Updates to StringPairArray
1 parent a01aee4 commit a08cd1e

File tree

3 files changed

+449
-37
lines changed

3 files changed

+449
-37
lines changed

modules/yup_core/text/yup_StringPairArray.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,25 @@ StringPairArray::StringPairArray (bool shouldIgnoreCase)
4545
{
4646
}
4747

48+
StringPairArray::StringPairArray (const std::initializer_list<KeyValuePair>& stringPairs)
49+
{
50+
for (const auto& item : stringPairs)
51+
{
52+
keys.add (item.key);
53+
values.add (item.value);
54+
}
55+
}
56+
57+
StringPairArray::StringPairArray (bool shouldIgnoreCase, const std::initializer_list<KeyValuePair>& stringPairs)
58+
: ignoreCase (shouldIgnoreCase)
59+
{
60+
for (const auto& item : stringPairs)
61+
{
62+
keys.add (item.key);
63+
values.add (item.value);
64+
}
65+
}
66+
4867
StringPairArray::StringPairArray (const StringPairArray& other)
4968
: keys (other.keys)
5069
, values (other.values)

0 commit comments

Comments
 (0)