~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to libdrizzle-2.0/libdrizzle/libdrizzle.hpp

  • Committer: Olaf van der Spek
  • Date: 2011-08-20 14:47:10 UTC
  • mto: This revision was merged to the branch mainline in revision 2409.
  • Revision ID: olafvdspek@gmail.com-20110820144710-1a255arp4f5vnzar
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
    conf_files.push_back(string(d) + "/.drizzle.conf");
341
341
  }
342
342
  
343
 
  typedef map<string, string> conf_t;
344
 
  conf_t conf;
 
343
  map<string, string> conf;
345
344
  BOOST_FOREACH(string& it, conf_files)
346
345
  {
347
346
    ifstream is(it.c_str());
360
359
      else if (!client_section)
361
360
        continue;
362
361
      i = s.find('=');
363
 
      if (i == string::npos)
364
 
        continue;
365
 
      conf[boost::trim_copy(s.substr(0, i))] = boost::trim_copy(s.substr(i + 1));
 
362
      if (i != string::npos)
 
363
        conf[boost::trim_copy(s.substr(0, i))] = boost::trim_copy(s.substr(i + 1));
366
364
    }
367
365
  }
368
366
  if (conf.count("host") || conf.count("port"))