Internals: Cleanup some string constructors. No functional change.

This commit is contained in:
Wilson Snyder
2022-08-30 01:02:39 -04:00
parent 6a5f77b278
commit ea55db7286
25 changed files with 80 additions and 73 deletions
+2 -2
View File
@@ -199,7 +199,7 @@ string V3Os::filenameRealPath(const string& filename) {
realpath(filename.c_str(), retpath)
#endif
) {
return string(retpath);
return std::string{retpath};
} else {
return filename;
}
@@ -239,7 +239,7 @@ void V3Os::unlinkRegexp(const string& dir, const string& regexp) {
if (DIR* const dirp = opendir(dir.c_str())) {
while (struct dirent* const direntp = readdir(dirp)) {
if (VString::wildmatch(direntp->d_name, regexp.c_str())) {
const string fullname = dir + "/" + string(direntp->d_name);
const string fullname = dir + "/" + std::string{direntp->d_name};
#if defined(_WIN32) || defined(__MINGW32__)
_unlink(fullname.c_str());
#else