Skip to content

Commit

Permalink
cxxrtl: Fix formating
Browse files Browse the repository at this point in the history
  • Loading branch information
Henkru authored and whitequark committed Dec 13, 2023
1 parent 79c0bfc commit 1c8e58a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions backends/cxxrtl/cxxrtl_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -630,18 +630,16 @@ std::string escape_cxx_string(const std::string &input)

std::string basename(const std::string &filepath)
{
#ifndef _WIN32
const std::string dir_seps = "/";
#else
#ifdef _WIN32
const std::string dir_seps = "\\/";
#else
const std::string dir_seps = "/";
#endif
size_t sep_pos = filepath.find_last_of(dir_seps);
if (sep_pos != std::string::npos) {
if (sep_pos != std::string::npos)
return filepath.substr(sep_pos + 1);
}
else {
else
return filepath;
}
}

template<class T>
Expand Down

0 comments on commit 1c8e58a

Please sign in to comment.