mirror of https://github.com/YosysHQ/yosys.git
cxxrtl: Fix formating
This commit is contained in:
parent
79c0bfcb22
commit
1c8e58a736
|
@ -630,18 +630,16 @@ std::string escape_cxx_string(const std::string &input)
|
||||||
|
|
||||||
std::string basename(const std::string &filepath)
|
std::string basename(const std::string &filepath)
|
||||||
{
|
{
|
||||||
#ifndef _WIN32
|
#ifdef _WIN32
|
||||||
const std::string dir_seps = "/";
|
|
||||||
#else
|
|
||||||
const std::string dir_seps = "\\/";
|
const std::string dir_seps = "\\/";
|
||||||
|
#else
|
||||||
|
const std::string dir_seps = "/";
|
||||||
#endif
|
#endif
|
||||||
size_t sep_pos = filepath.find_last_of(dir_seps);
|
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);
|
return filepath.substr(sep_pos + 1);
|
||||||
}
|
else
|
||||||
else {
|
|
||||||
return filepath;
|
return filepath;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
|
|
Loading…
Reference in New Issue