Skip to content

Commit 1ed6af2

Browse files
committed
fixed arrays foir initialise
1 parent 929ba52 commit 1ed6af2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Store/Store.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,15 @@ namespace ToolFramework{
6161
*/
6262
template<typename T> bool Get(std::string name,std::vector<T> &out){
6363

64-
if(m_variables.count(name)>0 && StringStrip(m_variables[name])[0]=='['){
64+
std::string stripped = StringStrip(m_variables[name]);
65+
66+
if(m_variables.count(name)>0 && stripped[0]=='['){
6567
std::stringstream stream;
6668
out.clear();
6769

68-
for(unsigned int i=1; i<m_variables[name].length(); i++){
69-
if(m_variables[name][i]!=',' && m_variables[name][i]!=']'){
70-
if(m_variables[name][i]!='"') stream.put(m_variables[name][i]);
70+
for(unsigned int i=1; i<stripped.length(); i++){
71+
if(stripped[i]!=',' && stripped[i]!=']'){
72+
if(stripped[i]!='"') stream.put(stripped[i]);
7173
}
7274
else {
7375
T tmp;

0 commit comments

Comments
 (0)