Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
SermetPekin committed Nov 6, 2024
1 parent 5bbd98d commit 89223df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 5 additions & 3 deletions extern/dotenv/dotenv.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,15 @@ class dotenv
void load(const std::string &filepath)
{
std::ifstream file(filepath);
if (!file)

if (!file)
{
std::cerr << "Could not open " << filepath << " file" << std::endl;
std::cerr << "Could not find " << filepath << " file" << std::endl;
return;
}

std::string line;

while (std::getline(file, line))
{
line = trim(line);
Expand All @@ -100,7 +102,7 @@ class dotenv

size_t delimiterPos = line.find('=');
if (delimiterPos == std::string::npos)
continue; // Skip if no '=' is found
continue;

std::string key = trim(line.substr(0, delimiterPos));
std::string value = trim(line.substr(delimiterPos + 1));
Expand Down
1 change: 0 additions & 1 deletion include/dataframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ namespace evds
{

class DataFrame;


void save_as_csv(const DataFrame &df, const std::string &filename, std::optional<char> delimiter = std::nullopt) ;
using Cell = std::variant<std::monostate, double, long long, std::string>;
Expand Down

0 comments on commit 89223df

Please sign in to comment.