Skip to content

Commit 6e1ded2

Browse files
author
Daniel Kroening
authored
Merge pull request #5340 from diffblue/remove-deprecated12
remove deprecated split_string variant
2 parents cd3c603 + 89edeff commit 6e1ded2

File tree

3 files changed

+9
-24
lines changed

3 files changed

+9
-24
lines changed

src/memory-analyzer/memory_analyzer_parse_options.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,7 @@ int memory_analyzer_parse_optionst::doit()
9797
std::string binary = cmdline.args.front();
9898

9999
const std::string symbol_list(cmdline.get_value("symbols"));
100-
std::vector<std::string> result;
101-
split_string(symbol_list, ',', result, true, true);
100+
std::vector<std::string> result = split_string(symbol_list, ',', true, true);
102101

103102
auto opt = read_goto_binary(binary, ui_message_handler);
104103

src/util/string_utils.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,8 @@ void split_string(
9999
// delim can't be a space character if using strip
100100
PRECONDITION(!std::isspace(delim) || !strip);
101101

102-
std::vector<std::string> result;
102+
std::vector<std::string> result = split_string(s, delim, strip);
103103

104-
split_string(s, delim, result, strip);
105104
if(result.size() != 2)
106105
{
107106
throw deserialization_exceptiont{"expected string '" + s +

src/util/string_utils.h

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,22 @@ std::string strip_string(const std::string &s);
2020

2121
std::string capitalize(const std::string &str);
2222

23+
void split_string(
24+
const std::string &s,
25+
char delim,
26+
std::string &left,
27+
std::string &right,
28+
bool strip = false);
29+
2330
/// Given a string s, split into a sequence of substrings when separated by
2431
/// specified delimiter.
2532
/// \param s: The string to split up
2633
/// \param delim: The character to use as the delimiter
27-
/// \param [out] result: The sub strings. Must be empty.
2834
/// \param strip: If true, strip_string will be used on each element, removing
2935
/// whitespace from the beginning and end of each element
3036
/// \param remove_empty: If true, all empty-string elements will be removed.
3137
/// This is applied after strip so whitespace only elements will be removed if
3238
/// both are set to true.
33-
DEPRECATED(SINCE(
34-
2019,
35-
11,
36-
14,
37-
"use split_string(s, delim, strip, remove_empty) instead"))
38-
void split_string(
39-
const std::string &s,
40-
char delim,
41-
std::vector<std::string> &result,
42-
bool strip = false,
43-
bool remove_empty = false);
44-
45-
void split_string(
46-
const std::string &s,
47-
char delim,
48-
std::string &left,
49-
std::string &right,
50-
bool strip=false);
51-
5239
std::vector<std::string> split_string(
5340
const std::string &s,
5441
char delim,

0 commit comments

Comments
 (0)