Review comments

This commit is contained in:
Ryan Houdek committed 2023-04-07 17:01:53 -07:00
1 parent 96e9b5cf51
commit e98a46aa5f
11 files changed
+61 -56

No files matched your search

+3 -6
View File
@@ -203,13 +203,10 @@ namespace FHU::Filesystem {
/**
* @brief Renames a file and overwrites if it already exists.
*
* @param From
* @param To
*
* @return True if the rename occured, False otherwise.
* @return No error on rename.
*/
inline bool RenameFile(const fextl::string &From, const fextl::string &To) {
return rename(From.c_str(), To.c_str()) == 0;
[[nodiscard]] inline std::error_code RenameFile(const fextl::string &From, const fextl::string &To) {
return rename(From.c_str(), To.c_str()) == 0 ? std::error_code{} : std::make_error_code(std::errc::io_error);
}
inline fextl::string LexicallyNormal(const fextl::string &Path) {