File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535#include < stdexcept>
3636#include < iostream>
3737#include " ticcutils/StringOps.h"
38+ #include " ticcutils/PrettyPrint.h"
3839
3940using namespace std ;
4041
@@ -115,7 +116,12 @@ namespace TiCC {
115116 val = val.substr (1 , val.length ()-2 );
116117 }
117118 val = fixControls ( val );
118- myMap[section][att] = val;
119+ if ( val.size () == 0 ){
120+ myMap[section].erase (att);
121+ }
122+ else {
123+ myMap[section][att] = val;
124+ }
119125 return true ;
120126 }
121127 return false ;
@@ -139,8 +145,9 @@ namespace TiCC {
139145 else {
140146 cdir += " /" ;
141147 }
142- // cerr << "dirname= " << cdir << endl;
143- myMap[" global" ][" configDir" ] = cdir; // can be overidden below
148+ if ( !cdir.empty () ){
149+ myMap[" global" ][" configDir" ] = cdir; // can be overidden below
150+ }
144151 string inLine;
145152 string section = " global" ;
146153 while ( getline ( is, inLine ) ){
You can’t perform that action at this time.
0 commit comments