diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-13 21:54:39 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-13 21:54:39 +0300 |
commit | 86b19d64c2692665aba33e44ee5db6cbf36b6342 (patch) | |
tree | 93d91c84258f9b76ab29ab51119bbc0044d729a4 /src/gui/models/namesmodel.cpp | |
parent | a45303dc06c74735389607e5b281bb69543547ed (diff) | |
download | manaverse-86b19d64c2692665aba33e44ee5db6cbf36b6342.tar.gz manaverse-86b19d64c2692665aba33e44ee5db6cbf36b6342.tar.bz2 manaverse-86b19d64c2692665aba33e44ee5db6cbf36b6342.tar.xz manaverse-86b19d64c2692665aba33e44ee5db6cbf36b6342.zip |
Add option to select any existing SDL renderer drivers for SDL2 default mode.
Diffstat (limited to 'src/gui/models/namesmodel.cpp')
-rw-r--r-- | src/gui/models/namesmodel.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gui/models/namesmodel.cpp b/src/gui/models/namesmodel.cpp index ee26dbdaa..5344a7a7d 100644 --- a/src/gui/models/namesmodel.cpp +++ b/src/gui/models/namesmodel.cpp @@ -21,6 +21,7 @@ #include "gui/models/namesmodel.h" #include "utils/cast.h" +#include "utils/foreach.h" #include "utils/gettext.h" #include "debug.h" @@ -55,3 +56,13 @@ void NamesModel::fillFromArray(const char *const *const arr, for (size_t f = 0; f < sz; f ++) mNames.push_back(gettext(arr[f])); } + +void NamesModel::fillFromVector(const StringVect &vect) +{ + FOR_EACH(StringVectCIter, it, vect) + { + const std::string str = *it; + if (!str.empty()) + mNames.push_back(str); + } +} |