File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -460,8 +460,6 @@ namespace dotenv
460460 env_file.close ();
461461 }
462462
463- _config = true ;
464-
465463 return *this ;
466464 }
467465
@@ -473,8 +471,6 @@ namespace dotenv
473471
474472 inline const value_type operator [](const key_type& k) const
475473 {
476- if (not _config) { throw std::logic_error (config_err); }
477-
478474 const char * value = std::getenv (k.c_str ());
479475
480476 if (value == nullptr )
@@ -508,14 +504,12 @@ namespace dotenv
508504 bool _config = false ;
509505
510506 static const std::string env_filename;
511- static const std::string config_err;
512507 static dotenv _instance;
513508
514509 };
515510
516511
517512 const std::string dotenv::env_filename = " .env" ;
518- const std::string dotenv::config_err = " config() method must be called first" ;
519513 dotenv dotenv::_instance;
520514
521515
You can’t perform that action at this time.
0 commit comments