mirror of
https://github.com/AxioDL/nod.git
synced 2025-12-08 21:17:51 +00:00
Windows build fixes and warning avoidance
This commit is contained in:
@@ -51,7 +51,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
else
|
||||
continue;
|
||||
|
||||
m_entries.push_back(std::move(Entry(std::move(fp), d.cFileName, sz, isDir)));
|
||||
m_entries.push_back(Entry(fp, d.cFileName, sz, isDir));
|
||||
} while (FindNextFileW(dir, &d));
|
||||
break;
|
||||
case Mode::DirsThenFilesSorted:
|
||||
@@ -70,7 +70,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
Sstat st;
|
||||
if (Stat(fp.c_str(), &st) || !S_ISDIR(st.st_mode))
|
||||
continue;
|
||||
sort.emplace(std::make_pair(d.cFileName, Entry(std::move(fp), d.cFileName, 0, true)));
|
||||
sort.emplace(std::make_pair(d.cFileName, Entry(fp, d.cFileName, 0, true)));
|
||||
} while (FindNextFileW(dir, &d));
|
||||
|
||||
m_entries.reserve(sort.size());
|
||||
@@ -106,7 +106,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
Sstat st;
|
||||
if (Stat(fp.c_str(), &st) || !S_ISREG(st.st_mode))
|
||||
continue;
|
||||
sort.emplace(std::make_pair(st.st_size, Entry(std::move(fp), d.cFileName, st.st_size, false)));
|
||||
sort.emplace(std::make_pair(st.st_size, Entry(fp, d.cFileName, st.st_size, false)));
|
||||
} while (FindNextFileW(dir, &d));
|
||||
|
||||
m_entries.reserve(sort.size());
|
||||
@@ -132,7 +132,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
Sstat st;
|
||||
if (Stat(fp.c_str(), &st) || !S_ISREG(st.st_mode))
|
||||
continue;
|
||||
sort.emplace(std::make_pair(d.cFileName, Entry(std::move(fp), d.cFileName, st.st_size, false)));
|
||||
sort.emplace(std::make_pair(d.cFileName, Entry(fp, d.cFileName, st.st_size, false)));
|
||||
} while (FindNextFileW(dir, &d));
|
||||
|
||||
m_entries.reserve(sort.size());
|
||||
@@ -180,7 +180,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
else
|
||||
continue;
|
||||
|
||||
m_entries.push_back(Entry(std::move(fp), d->d_name, sz, isDir));
|
||||
m_entries.push_back(Entry(fp, d->d_name, sz, isDir));
|
||||
}
|
||||
break;
|
||||
case Mode::DirsThenFilesSorted:
|
||||
@@ -199,7 +199,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
Sstat st;
|
||||
if (Stat(fp.c_str(), &st) || !S_ISDIR(st.st_mode))
|
||||
continue;
|
||||
sort.emplace(std::make_pair(d->d_name, Entry(std::move(fp), d->d_name, 0, true)));
|
||||
sort.emplace(std::make_pair(d->d_name, Entry(fp, d->d_name, 0, true)));
|
||||
}
|
||||
|
||||
m_entries.reserve(sort.size());
|
||||
@@ -234,7 +234,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
Sstat st;
|
||||
if (Stat(fp.c_str(), &st) || !S_ISREG(st.st_mode))
|
||||
continue;
|
||||
sort.emplace(std::make_pair(st.st_size, Entry(std::move(fp), d->d_name, st.st_size, false)));
|
||||
sort.emplace(std::make_pair(st.st_size, Entry(fp, d->d_name, st.st_size, false)));
|
||||
}
|
||||
|
||||
m_entries.reserve(sort.size());
|
||||
@@ -260,7 +260,7 @@ DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode,
|
||||
Sstat st;
|
||||
if (Stat(fp.c_str(), &st) || !S_ISREG(st.st_mode))
|
||||
continue;
|
||||
sort.emplace(std::make_pair(d->d_name, Entry(std::move(fp), d->d_name, st.st_size, false)));
|
||||
sort.emplace(std::make_pair(d->d_name, Entry(fp, d->d_name, st.st_size, false)));
|
||||
}
|
||||
|
||||
m_entries.reserve(sort.size());
|
||||
|
||||
Reference in New Issue
Block a user