Skip to content

Commit

Permalink
Replace a few split occurrences.
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 18, 2017
1 parent 0f22fdb commit 0acfe8e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions radiant/map/infofile/InfoFile.cpp
Expand Up @@ -5,7 +5,7 @@
#include "string/convert.h"

#include "i18n.h"
#include <boost/algorithm/string/split.hpp>
#include "string/split.h"
#include <boost/algorithm/string/classification.hpp>
#include <boost/lexical_cast.hpp>

Expand Down Expand Up @@ -54,7 +54,7 @@ void InfoFile::parseInfoFileHeader()
try
{
std::vector<std::string> parts;
boost::algorithm::split(parts, HEADER_SEQUENCE, boost::algorithm::is_any_of(" "));
string::split(parts, HEADER_SEQUENCE, " ");

// Parse the string "DarkRadiant Map Information File Version"
for (std::size_t i = 0; i < parts.size(); i++)
Expand Down
4 changes: 2 additions & 2 deletions radiant/selection/ManipulateMouseTool.cpp
Expand Up @@ -11,7 +11,7 @@
#include "SelectionTest.h"
#include "SceneWalkers.h"
#include <fmt/format.h>
#include <boost/algorithm/string/split.hpp>
#include "string/split.h"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/predicate.hpp>

Expand Down Expand Up @@ -339,7 +339,7 @@ void ManipulateMouseTool::renderOverlay()
{
#ifdef _DEBUG
std::vector<std::string> lines;
boost::algorithm::split(lines, _debugText, boost::algorithm::is_any_of("\n"));
string::split(lines, _debugText, "\n");

for (std::size_t i = 0; i < lines.size(); ++i)
{
Expand Down
4 changes: 2 additions & 2 deletions radiant/settings/PreferencePage.cpp
Expand Up @@ -3,7 +3,7 @@
#include <stdexcept>
#include "i18n.h"
#include "itextstream.h"
#include <boost/algorithm/string/split.hpp>
#include "string/split.h"
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <fmt/format.h>
Expand Down Expand Up @@ -53,7 +53,7 @@ PreferencePage& PreferencePage::createOrFindPage(const std::string& path)
{
// Split the path into parts
std::list<std::string> parts;
boost::algorithm::split(parts, path, boost::algorithm::is_any_of("/"));
string::split(parts, path, "/");

if (parts.empty())
{
Expand Down
4 changes: 2 additions & 2 deletions radiant/ui/common/ShaderSelector.cpp
Expand Up @@ -22,7 +22,7 @@
#include <string>
#include <map>

#include <boost/algorithm/string/split.hpp>
#include "string/split.h"
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include "string/case_conv.h"
Expand Down Expand Up @@ -52,7 +52,7 @@ ShaderSelector::ShaderSelector(wxWindow* parent, Client* client, const std::stri
SetSizer(new wxBoxSizer(wxVERTICAL));

// Split the given comma-separated list into the vector
boost::algorithm::split(_prefixes, prefixes, boost::algorithm::is_any_of(","));
string::split(_prefixes, prefixes, ",");

// Pack in TreeView and info panel
createTreeView();
Expand Down
4 changes: 2 additions & 2 deletions radiant/ui/einspector/FloatPropertyEditor.cpp
Expand Up @@ -11,7 +11,7 @@
#include <wx/sizer.h>
#include <wx/button.h>

#include <boost/algorithm/string/split.hpp>
#include "string/split.h"
#include <boost/algorithm/string/classification.hpp>
#include <boost/lexical_cast.hpp>

Expand Down Expand Up @@ -39,7 +39,7 @@ FloatPropertyEditor::FloatPropertyEditor(wxWindow* parent, Entity* entity,

// Split the options string to get min and max values
std::vector<std::string> values;
boost::algorithm::split(values, options, boost::algorithm::is_any_of(","));
string::split(values, options, ",");
if (values.size() != 2)
return;

Expand Down
4 changes: 0 additions & 4 deletions radiant/ui/einspector/TexturePropertyEditor.cpp
Expand Up @@ -5,10 +5,6 @@
#include "i18n.h"
#include "ientity.h"

#include <boost/algorithm/string/predicate.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>

#include <wx/panel.h>
#include <wx/button.h>
#include <wx/sizer.h>
Expand Down
4 changes: 2 additions & 2 deletions radiant/ui/modelexport/ExportAsModelDialog.cpp
Expand Up @@ -13,7 +13,7 @@
#include <wx/panel.h>
#include <wx/sizer.h>
#include "string/case_conv.h"
#include <boost/algorithm/string/split.hpp>
#include "string/split.h"
#include <boost/algorithm/string/classification.hpp>

#include "selectionlib.h"
Expand Down Expand Up @@ -210,7 +210,7 @@ void ExportAsModelDialog::handleFormatSelectionChange()
// Check if the replace current selection option is available
std::string extensions = GlobalGameManager().currentGame()->getKeyValue("modeltypes");
std::set<std::string> supportedExtensions;
boost::algorithm::split(supportedExtensions, extensions, boost::algorithm::is_any_of(" "));
string::split(supportedExtensions, extensions, " ");

wxCheckBox* replaceSelectionBox = findNamedObject<wxCheckBox>(this, "ExportDialogReplaceWithModel");

Expand Down

0 comments on commit 0acfe8e

Please sign in to comment.