File tree Expand file tree Collapse file tree
ofxProjectGenerator/src/addons Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414#include < list>
1515using namespace std ;
1616
17+ vector<string> splitStringOnceByLeft (const string &source, const string &delimiter) {
18+ size_t pos = source.find (delimiter);
19+ vector<string> res;
20+ if (pos == string::npos) {
21+ res.push_back (source);
22+ return res;
23+ }
24+
25+ res.push_back (source.substr (0 , pos));
26+ res.push_back (source.substr (pos + delimiter.length ()));
27+ return res;
28+ }
29+
1730ofAddon::ofAddon (){
1831 isLocalAddon = false ;
1932 pathToProject = " ." ;
@@ -391,10 +404,10 @@ void ofAddon::parseConfig(){
391404 vector<string> varValue;
392405 if (line.find (" +=" )!=string::npos){
393406 addToValue = true ;
394- varValue = ofSplitString (line," +=" );
407+ varValue = splitStringOnceByLeft (line," +=" );
395408 }else {
396409 addToValue = false ;
397- varValue = ofSplitString (line," =" );
410+ varValue = splitStringOnceByLeft (line," =" );
398411 }
399412 variable = Poco::trim (varValue[0 ]);
400413 value = Poco::trim (varValue[1 ]);
You can’t perform that action at this time.
0 commit comments