Skip to content

Commit 231246d

Browse files
committed
Deletes useless config warning
1 parent cd7904a commit 231246d

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

dotenv.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)