Merge branch 'split_stringops' into 'master'

Split components/misc/stringops.hpp into multiple headers

See merge request OpenMW/openmw!2233
post_malone
psi29a 2 years ago
commit bb9884c024

@ -7,7 +7,7 @@
#include <boost/program_options.hpp>
#include <components/bsa/compressedbsafile.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#define BSATOOL_VERSION 1.1

@ -17,6 +17,7 @@
#include <components/esm/records.hpp>
#include <components/esm/format.hpp>
#include <components/files/openfile.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "record.hpp"
#include "labels.hpp"

@ -13,7 +13,7 @@
#include <components/esm3/loadspel.hpp>
#include <components/esm3/loadweap.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/format.hpp>
std::string bodyPartLabel(int idx)
{

@ -4,7 +4,7 @@
#include <iostream>
#include <sstream>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/format.hpp>
namespace
{

@ -2,7 +2,7 @@
#include <iostream>
#include <limits>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "convertacdt.hpp"

@ -24,6 +24,8 @@
#include <components/esm3/stolenitems.hpp>
#include <components/esm3/projectilestate.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "importcrec.hpp"
#include "importcntc.hpp"

@ -1,6 +1,7 @@
#include "convertinventory.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <cstdlib>
namespace ESSImport

@ -3,7 +3,7 @@
#include <cmath>
#include <components/misc/constants.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
namespace ESSImport
{

@ -1,9 +1,9 @@
#include "convertscpt.hpp"
#include <components/misc/stringops.hpp>
#include "convertscri.hpp"
#include <components/misc/strings/lower.hpp>
namespace ESSImport
{

@ -1,7 +1,9 @@
#include "importer.hpp"
#include <iostream>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/strings/format.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/esm3/esmreader.hpp>
#include <boost/filesystem.hpp>

@ -14,7 +14,7 @@
#include <components/esmloader/lessbyid.hpp>
#include <components/esmloader/record.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/resource/bulletshapemanager.hpp>
#include <components/settings/settings.hpp>
#include <components/vfs/manager.hpp>

@ -3,7 +3,7 @@
#include <iostream>
#include <filesystem>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/nif/niffile.hpp>
#include <components/files/constrainedfilestream.hpp>
#include <components/vfs/manager.hpp>

@ -2,7 +2,7 @@
#include <algorithm>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
bool CSMDoc::Blacklist::isBlacklisted (const CSMWorld::UniversalId& id) const
{

@ -4,7 +4,7 @@
#include <stdexcept>
#include <sstream>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "../world/columns.hpp"
#include "../world/data.hpp"

@ -1,6 +1,6 @@
#include "mergestages.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "mergestate.hpp"

@ -1,6 +1,6 @@
#include "referenceablecheck.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/resourcehelpers.hpp>
#include "../prefs/state.hpp"

@ -2,7 +2,7 @@
#include "../prefs/state.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
CSMTools::StartScriptCheckStage::StartScriptCheckStage (
const CSMWorld::IdCollection<ESM::StartScript>& startScripts,

@ -13,7 +13,7 @@
#include <QVariant>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "columnbase.hpp"
#include "collectionbase.hpp"

@ -1,7 +1,7 @@
#include "columns.hpp"
#include <components/fallback/fallback.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "universalid.hpp"
#include "infoselectwrapper.hpp"
@ -391,10 +391,8 @@ std::string CSMWorld::Columns::getName (ColumnId column)
int CSMWorld::Columns::getId (const std::string& name)
{
std::string name2 = Misc::StringUtils::lowerCase (name);
for (int i=0; sNames[i].mName; ++i)
if (Misc::StringUtils::ciEqual(std::string_view(sNames[i].mName), name2))
if (Misc::StringUtils::ciEqual(std::string_view(sNames[i].mName), name))
return sNames[i].mId;
return -1;

@ -3,7 +3,7 @@
#include <algorithm>
#include <memory>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/misc/constants.hpp>
#include "../doc/document.hpp"

@ -4,8 +4,6 @@
#include <sstream>
#include <unordered_set>
#include <components/misc/stringops.hpp>
#include <QAbstractItemModel>
#include <QAbstractProxyModel>

@ -7,7 +7,7 @@
#include <stdexcept>
#include <components/esm3/cellid.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "collectionbase.hpp"
#include "columnbase.hpp"
@ -354,9 +354,8 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import
for (int i = 0; i < idCollection()->getSize(); ++i)
{
auto& record = static_cast<const Record<LandTexture>&>(idCollection()->getRecord(i));
std::string texture = Misc::StringUtils::lowerCase(record.get().mTexture);
if (record.isModified())
reverseLookupMap.emplace(texture, idCollection()->getId(i));
reverseLookupMap.emplace(Misc::StringUtils::lowerCase(record.get().mTexture), idCollection()->getId(i));
}
for (const std::string& id : ids)

@ -7,7 +7,7 @@
#include <components/esm3/esmreader.hpp>
#include <components/esm3/loaddial.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
namespace CSMWorld
{

@ -1,6 +1,6 @@
#include "infotableproxymodel.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "idtablebase.hpp"
#include "columns.hpp"

@ -1,5 +1,7 @@
#include "refiddata.hpp"
#include <components/misc/strings/lower.hpp>
#include <cassert>
#include <memory>
#include <string_view>

@ -28,7 +28,7 @@
#include <components/esm3/loadmisc.hpp>
#include <components/esm3/esmwriter.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "record.hpp"
#include "universalid.hpp"

@ -6,7 +6,7 @@
#include <QBrush>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "data.hpp"
#include "universalid.hpp"

@ -7,7 +7,7 @@
#include <components/vfs/manager.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
CSMWorld::Resources::Resources (const VFS::Manager* vfs, const std::string& baseDirectory, UniversalId::Type type,
const char * const *extensions)

@ -2,7 +2,7 @@
#include <stdexcept>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
CSMWorld::Scope CSMWorld::getScopeFromId (const std::string& id)
{
@ -12,7 +12,7 @@ CSMWorld::Scope CSMWorld::getScopeFromId (const std::string& id)
std::string::size_type i = id.find ("::");
if (i!=std::string::npos)
namespace_ = Misc::StringUtils::lowerCase (id.substr (0, i));
namespace_ = Misc::StringUtils::lowerCase(std::string_view(id).substr(0, i));
if (namespace_=="project")
return Scope_Project;

@ -3,7 +3,7 @@
#include <algorithm>
#include <sstream>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/compiler/quickfileparser.hpp>
#include <components/compiler/nullerrorhandler.hpp>

@ -1,6 +1,6 @@
#include "adjusterwidget.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <boost/filesystem.hpp>

@ -3,7 +3,7 @@
#include <osg/PositionAttitudeTransform>
#include <osg/Group>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/esm3/loadcell.hpp>
#include <components/esm3/loadland.hpp>
#include <components/terrain/terraingrid.hpp>

@ -6,7 +6,7 @@
#include <components/esm3/loadland.hpp>
#include <components/fallback/fallback.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/resource/imagemanager.hpp>
#include <components/resource/resourcesystem.hpp>
#include <components/sceneutil/waterutil.hpp>

@ -9,7 +9,7 @@
#include <QLabel>
#include <QComboBox>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "../../model/world/commands.hpp"
#include "../../model/world/data.hpp"

@ -1,6 +1,6 @@
#include "idvalidator.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
bool CSVWorld::IdValidator::isValid (const QChar& c, bool first) const
{

@ -5,7 +5,7 @@
#include <QLabel>
#include <QUuid>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "../../model/doc/document.hpp"

@ -9,7 +9,7 @@
#include <components/debug/debuglog.hpp>
#include <components/misc/helpviewer.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "../../model/doc/document.hpp"

@ -9,7 +9,7 @@
#include <components/compiler/streamerrorhandler.hpp>
#include <components/translation/translation.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/esm3/loadinfo.hpp>
#include "../mwworld/ptr.hpp"

@ -7,7 +7,7 @@
#include <components/esm3/queststate.hpp>
#include <components/esm3/journalentry.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "../mwworld/esmstore.hpp"
#include "../mwworld/class.hpp"

@ -7,7 +7,8 @@
#include <vector>
#include <algorithm> // std::reverse
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/strings/lower.hpp>
namespace MWDialogue
{

@ -4,7 +4,7 @@
#include <sstream>
#include <iterator>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
namespace
{
@ -293,5 +293,5 @@ bool MWDialogue::SelectWrapper::selectCompare (bool value) const
std::string MWDialogue::SelectWrapper::getName() const
{
return Misc::StringUtils::lowerCase (mSelect.mSelectRule.substr (5));
return Misc::StringUtils::lowerCase(std::string_view(mSelect.mSelectRule).substr(5));
}

@ -7,6 +7,7 @@
#include <MyGUI_EditBox.h>
#include <components/widgets/list.hpp>
#include <components/misc/strings/format.hpp>
#include <components/settings/settings.hpp>
#include "../mwbase/environment.hpp"

@ -9,7 +9,7 @@
#include <components/interpreter/defines.hpp>
#include <components/resource/resourcesystem.hpp>
#include <components/vfs/manager.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/fontloader/fontloader.hpp>

@ -12,7 +12,7 @@
#include <osg/Texture2D>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/myguiplatform/myguitexture.hpp>

@ -1,6 +1,7 @@
#include <MyGUI_ScrollBar.h>
#include <components/misc/rng.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/mechanicsmanager.hpp"

@ -5,7 +5,7 @@
#include <MyGUI_LanguageManager.h>
#include <components/translation/translation.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "../mwbase/world.hpp"
#include "../mwbase/journal.hpp"

@ -9,7 +9,7 @@
#include <MyGUI_Button.h>
#include <MyGUI_InputManager.h>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/widgets/imagebutton.hpp>
#include <components/widgets/list.hpp>

@ -6,7 +6,7 @@
#include <MyGUI_Button.h>
#include <components/debug/debuglog.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/soundmanager.hpp"

@ -2,7 +2,7 @@
#include <MyGUI_RenderManager.h>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
namespace MWGui
{

@ -15,7 +15,7 @@
#include <components/myguiplatform/myguitexture.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/settings/settings.hpp>

@ -18,7 +18,8 @@
#include <SDL_video.h>
#include <components/debug/debuglog.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/strings/format.hpp>
#include <components/misc/constants.hpp>
#include <components/misc/pathhelpers.hpp>
#include <components/widgets/sharedstatebutton.hpp>

@ -1,6 +1,5 @@
#include "sortfilteritemmodel.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/utf8stream.hpp>
#include <components/debug/debuglog.hpp>
#include <components/esm3/loadalch.hpp>

@ -4,7 +4,7 @@
#include <MyGUI_Button.h>
#include <MyGUI_ScrollView.h>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"

@ -3,8 +3,8 @@
#include <MyGUI_EditBox.h>
#include <MyGUI_InputManager.h>
#include <components/misc/stringops.hpp>
#include <components/settings/settings.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/environment.hpp"

@ -1,6 +1,6 @@
#include "tradeitemmodel.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/settings/settings.hpp>
#include "../mwworld/class.hpp"

@ -6,6 +6,7 @@
#include <MyGUI_ControllerRepeatClick.h>
#include <components/widgets/numericeditbox.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"

@ -8,6 +8,7 @@
#include <components/widgets/box.hpp>
#include <components/settings/settings.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/world.hpp"

@ -7,7 +7,6 @@
#include <variant>
#include <components/lua/luastate.hpp>
#include <components/misc/stringops.hpp>
#include "localscripts.hpp"
#include "luamanagerimp.hpp"

@ -7,7 +7,7 @@
#include <components/lua_ui/resources.hpp>
#include <components/settings/settings.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/format.hpp>
#include "context.hpp"
#include "luamanagerimp.hpp"

@ -5,9 +5,10 @@
#include <components/debug/debuglog.hpp>
#include <components/misc/rng.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/esm3/loadmgef.hpp>
#include <components/settings/settings.hpp>

@ -23,7 +23,7 @@
#include <components/misc/mathutil.hpp>
#include <components/misc/rng.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/settings/settings.hpp>

@ -2,6 +2,7 @@
#define OPENMW_MECHANICS_DISEASE_H
#include <components/misc/rng.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/environment.hpp"

@ -6,7 +6,7 @@
#include "../mwworld/esmstore.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/esm3/loadcont.hpp>
#include <algorithm>

@ -8,6 +8,8 @@
#include <components/esm3/loadfact.hpp>
#include <components/esm3/npcstats.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwworld/esmstore.hpp"
#include "../mwbase/environment.hpp"

@ -1,6 +1,7 @@
#include "recharge.hpp"
#include <components/misc/rng.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/world.hpp"
#include "../mwbase/environment.hpp"

@ -1,6 +1,7 @@
#include "repair.hpp"
#include <components/misc/rng.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/world.hpp"
#include "../mwbase/environment.hpp"

@ -3,6 +3,7 @@
#include <components/misc/constants.hpp>
#include <components/misc/rng.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/windowmanager.hpp"
#include "../mwbase/soundmanager.hpp"

@ -4,7 +4,6 @@
#include <components/esm3/loadspel.hpp>
#include <components/esm3/spellstate.hpp>
#include <components/misc/rng.hpp>
#include <components/misc/stringops.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"

@ -16,7 +16,6 @@
#include <components/sceneutil/lightutil.hpp>
#include <components/sceneutil/visitor.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/settings/settings.hpp>

@ -7,7 +7,7 @@
#include <components/sceneutil/textkeymap.hpp>
#include <components/sceneutil/util.hpp>
#include <components/sceneutil/nodecallback.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <vector>
#include <unordered_map>

@ -11,7 +11,6 @@
#include <components/sceneutil/positionattitudetransform.hpp>
#include <components/sceneutil/skeleton.hpp>
#include <components/settings/settings.hpp>
#include <components/misc/stringops.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"

@ -16,7 +16,8 @@
#include <components/sceneutil/util.hpp>
#include <components/resource/scenemanager.hpp>
#include <components/shader/shadermanager.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/vfs/manager.hpp>
#include <components/stereo/multiview.hpp>
#include <components/stereo/stereomanager.hpp>

@ -8,7 +8,7 @@
#include <osg/Texture2D>
#include <osg/TextureCubeMap>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/resource/resourcesystem.hpp>
#include <components/resource/scenemanager.hpp>
#include <components/shader/shadermanager.hpp>

@ -32,7 +32,6 @@
#include <components/sceneutil/lightmanager.hpp>
#include <components/misc/constants.hpp>
#include <components/misc/stringops.hpp>
#include <components/stereo/stereomanager.hpp>
#include <components/nifosg/controller.hpp>

@ -11,7 +11,7 @@
#include <components/interpreter/interpreter.hpp>
#include <components/interpreter/opcodes.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/format.hpp>
#include <components/esm3/loadskil.hpp>
#include <components/esm3/loadlevlist.hpp>

@ -1,7 +1,7 @@
#include "globalscripts.hpp"
#include <components/debug/debuglog.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/esm3/esmwriter.hpp>
#include <components/esm3/globalscript.hpp>

@ -9,7 +9,7 @@
#include <components/esm3/loadscpt.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/compiler/scanner.hpp>
#include <components/compiler/context.hpp>

@ -10,6 +10,8 @@
#include <components/misc/utf8stream.hpp>
#include <components/misc/strings/algorithm.hpp>
bool MWState::operator< (const Slot& left, const Slot& right)
{
return left.mTimeStamp<right.mTimeStamp;

@ -4,7 +4,7 @@
#include <MyGUI_LanguageManager.h>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/format.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/mechanicsmanager.hpp"

@ -10,7 +10,7 @@
#include <components/resource/keyframemanager.hpp>
#include <components/vfs/manager.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/terrain/world.hpp>
#include <components/terrain/view.hpp>
#include <components/esm3/loadcell.hpp>

@ -5,7 +5,8 @@
#include <components/debug/debuglog.hpp>
#include <components/esm3/inventorystate.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/strings/lower.hpp>
#include "../mwbase/environment.hpp"
#include "../mwbase/world.hpp"

@ -4,7 +4,7 @@
#include <components/esm3/esmwriter.hpp>
#include <components/esm3/esmreader.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "esmstore.hpp"

@ -2,7 +2,7 @@
#include <components/esmloader/load.hpp>
#include <components/esmloader/esmdata.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/esm3/readerscache.hpp>
#include <components/misc/resourcehelpers.hpp>
#include <components/resource/resourcesystem.hpp>

@ -9,7 +9,7 @@
#include <set>
#include <components/esm/records.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/rng.hpp>
#include "../mwdialogue/keywordsearch.hpp"

@ -1,6 +1,10 @@
#include <gtest/gtest.h>
#include "components/misc/stringops.hpp"
#include "components/misc/algorithm.hpp"
#include <components/misc/strings/algorithm.hpp>
#include <components/misc/strings/format.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/misc/algorithm.hpp>
#include <string>
#include <string_view>
@ -55,7 +59,7 @@ TEST_F (PartialBinarySearchTest, ci_test)
namespace
{
using ::Misc::StringUtils;
using namespace ::Misc::StringUtils;
using namespace ::testing;
template <class T>
@ -65,7 +69,9 @@ namespace
TYPED_TEST_P(MiscStringUtilsCiEqualEmptyTest, empty_strings_should_be_equal)
{
EXPECT_TRUE(StringUtils::ciEqual(typename TypeParam::first_type {}, typename TypeParam::second_type {}));
const typename TypeParam::first_type a {};
const typename TypeParam::second_type b {};
EXPECT_TRUE(ciEqual(a, b));
}
REGISTER_TYPED_TEST_SUITE_P(MiscStringUtilsCiEqualEmptyTest,
@ -104,21 +110,21 @@ namespace
{
const Value<typename TypeParam::first_type> a {foo};
const Value<typename TypeParam::second_type> b {foo};
EXPECT_TRUE(StringUtils::ciEqual(a, b)) << a << "\n" << b;
EXPECT_TRUE(ciEqual(a, b)) << a << "\n" << b;
}
TYPED_TEST_P(MiscStringUtilsCiEqualNotEmptyTest, same_strings_with_different_case_sensetivity_should_be_equal)
{
const Value<typename TypeParam::first_type> a {foo};
const Value<typename TypeParam::second_type> b {fooUpper};
EXPECT_TRUE(StringUtils::ciEqual(a, b)) << a << "\n" << b;
EXPECT_TRUE(ciEqual(a, b)) << a << "\n" << b;
}
TYPED_TEST_P(MiscStringUtilsCiEqualNotEmptyTest, different_strings_content_should_not_be_equal)
{
const Value<typename TypeParam::first_type> a {foo};
const Value<typename TypeParam::second_type> b {bar};
EXPECT_FALSE(StringUtils::ciEqual(a, b)) << a << "\n" << b;
EXPECT_FALSE(ciEqual(a, b)) << a << "\n" << b;
}
REGISTER_TYPED_TEST_SUITE_P(MiscStringUtilsCiEqualNotEmptyTest,
@ -143,6 +149,6 @@ namespace
TEST(MiscStringUtilsCiEqualTest, string_with_different_length_should_not_be_equal)
{
EXPECT_FALSE(StringUtils::ciEqual(std::string("a"), std::string("aa")));
EXPECT_FALSE(ciEqual(std::string("a"), std::string("aa")));
}
}

@ -20,7 +20,7 @@
#include <components/interpreter/interpreter.hpp>
#include <components/interpreter/opcodes.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
namespace
{

@ -9,7 +9,7 @@
#include <components/esm3/esmreader.hpp>
#include <components/esm3/esmwriter.hpp>
#include <components/loadinglistener/loadinglistener.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include "apps/openmw/mwworld/esmstore.hpp"
#include "apps/openmw/mwmechanics/spelllist.hpp"

@ -196,7 +196,7 @@ add_component_dir (esm4
)
add_component_dir (misc
constants utf8stream stringops resourcehelpers rng messageformatparser weakcache thread
constants utf8stream resourcehelpers rng messageformatparser weakcache thread
compression osguservalues errorMarker color
)

@ -46,7 +46,7 @@
#include <boost/iostreams/device/array.hpp>
#include <components/bsa/memorystream.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include <components/files/constrainedfilestream.hpp>
namespace Bsa

@ -1,6 +1,6 @@
#include "declarationparser.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "scanner.hpp"
#include "errorhandler.hpp"

@ -7,7 +7,7 @@
#include <iterator>
#include <sstream>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "generator.hpp"
#include "scanner.hpp"

@ -2,7 +2,7 @@
#include <memory>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "scanner.hpp"
#include "context.hpp"

@ -5,7 +5,7 @@
#include <ostream>
#include <iterator>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
namespace Compiler
{

@ -4,7 +4,7 @@
#include "exception.hpp"
#include "scanner.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
namespace Compiler
{

@ -8,7 +8,7 @@
#include "parser.hpp"
#include "extensions.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
namespace Compiler
{

@ -3,7 +3,7 @@
#include <algorithm>
#include <iterator>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/lower.hpp>
#include "scanner.hpp"
#include "generator.hpp"

@ -4,7 +4,7 @@
#include <components/misc/compression.hpp>
#include <components/sqlite3/db.hpp>
#include <components/sqlite3/request.hpp>
#include <components/misc/stringops.hpp>
#include <components/misc/strings/format.hpp>
#include <DetourAlloc.h>

@ -1,5 +1,7 @@
#include "cellref.hpp"
#include <algorithm>
#include <components/debug/debuglog.hpp>
#include "esmreader.hpp"

@ -2,7 +2,7 @@
#include "readerscache.hpp"
#include <components/misc/stringops.hpp>
#include <components/misc/strings/algorithm.hpp>
#include <components/files/openfile.hpp>
#include <stdexcept>
@ -13,8 +13,6 @@
namespace ESM
{
using namespace Misc;
ESM_Context ESMReader::getContext()
{
// Update the file position before returning

@ -6,8 +6,6 @@
#include <istream>
#include <memory>
#include <components/misc/stringops.hpp>
#include <components/to_utf8/to_utf8.hpp>
#include "components/esm/esmcommon.hpp"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save