forked from qt-creator/qt-creator
Utils: Introduce a conversion constructors for std::vector<std::string>
Change-Id: Ic37bf194240f5b76ec6299374cc7ad785b78a7ed Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -61,6 +61,14 @@ public:
|
||||
push_back(Utils::SmallString::fromQString(string));
|
||||
}
|
||||
|
||||
explicit SmallStringVector(const std::vector<std::string> &stringVector)
|
||||
{
|
||||
reserve(std::size_t(stringVector.size()));
|
||||
|
||||
for (const std::string &string : stringVector)
|
||||
emplace_back(string);
|
||||
}
|
||||
|
||||
#if !defined(UNIT_TESTS) && !(defined(_MSC_VER) && _MSC_VER < 1900)
|
||||
SmallStringVector(const SmallStringVector &) = delete;
|
||||
SmallStringVector &operator=(const SmallStringVector &) = delete;
|
||||
|
||||
Reference in New Issue
Block a user