mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 10:27:51 +00:00
cleaned up comments
This commit is contained in:
parent
b58e2d8f3a
commit
16ff56c165
@ -199,11 +199,13 @@ std::vector< std::string > split(std::string const &val, char c, int flags)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
//splits a string into three parts. The part before the first '(', the part between the
|
//splits a string into an odd number of parts. The part before the first '(', the part between the
|
||||||
//first '(' and the matching right ')', etc ... and the remainder of the string. Note that this
|
//first '(' and the matching right ')', etc ... and the remainder of the string. Note that this
|
||||||
//will find the first matching char in the left string and match against the corresponding
|
//will find the first matching char in the left string and match against the corresponding
|
||||||
//char in the right string. A correctly processed string should return with an odd number of elements to the vector.
|
//char in the right string. A correctly processed string should return with an odd number of elements to the vector.
|
||||||
//Empty elements are never removed as they are placeholders.
|
//Empty elements are never removed as they are placeholders.
|
||||||
|
//parenthetical_split("a(b)c{d}e(f{g})h","({",")}") should return a vector of
|
||||||
|
// <"a","b","c","d","e","f{g}","h">
|
||||||
std::vector< std::string > paranthetical_plit(std::string const &val, std::string const &left, std::string const &right,int flags)
|
std::vector< std::string > paranthetical_plit(std::string const &val, std::string const &left, std::string const &right,int flags)
|
||||||
{
|
{
|
||||||
std::vector< std::string > res;
|
std::vector< std::string > res;
|
||||||
@ -217,7 +219,6 @@ std::vector< std::string > paranthetical_plit(std::string const &val, std::strin
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
//fixme
|
|
||||||
while (i2 != val.end()) {
|
while (i2 != val.end()) {
|
||||||
for(size_t i=0; i < left.size(); i++){
|
for(size_t i=0; i < left.size(); i++){
|
||||||
if (*i2 == left[i]){
|
if (*i2 == left[i]){
|
||||||
@ -267,6 +268,7 @@ std::vector< std::string > paranthetical_plit(std::string const &val, std::strin
|
|||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
class string_map_variable_set : public variable_set
|
class string_map_variable_set : public variable_set
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user