Windows build fixes and warning avoidance

This commit is contained in:
Jack Andersen
2018-05-24 20:38:06 -10:00
parent 51a15e474e
commit d5f5db440c
7 changed files with 30 additions and 28 deletions

View File

@@ -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());