Use Strings::EMPTY

This commit is contained in:
Alexander Karatarakis 2017-08-28 19:29:55 -07:00
parent 992f192c5e
commit 6684240090
3 changed files with 8 additions and 8 deletions

View File

@ -38,7 +38,7 @@ namespace vcpkg
for (auto&& feature : spec->features)
f_specs.push_back(FeatureSpec{pspec, feature});
if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, ""});
if (spec->features.empty()) f_specs.push_back(FeatureSpec{pspec, Strings::EMPTY});
}
else
{
@ -56,7 +56,7 @@ namespace vcpkg
std::vector<FeatureSpec> ret;
for (auto&& spec : specs)
{
ret.emplace_back(spec.package_spec, "");
ret.emplace_back(spec.package_spec, Strings::EMPTY);
for (auto&& feature : spec.features)
ret.emplace_back(spec.package_spec, feature);
}

View File

@ -18,7 +18,7 @@ namespace vcpkg::Commands::Remove
{
auto& fs = paths.get_filesystem();
auto spghs = status_db->find_all(spec.name(), spec.triplet());
auto core_pkg = **status_db->find(spec.name(), spec.triplet(), "");
auto core_pkg = **status_db->find(spec.name(), spec.triplet(), Strings::EMPTY);
for (auto&& spgh : spghs)
{

View File

@ -25,7 +25,7 @@ namespace vcpkg::Metrics
errno_t err = gmtime_s(&newtime, &now);
if (err)
{
return "";
return Strings::EMPTY;
}
strftime(&date[0], date.size(), "%Y-%m-%dT%H:%M:%S", &newtime);
@ -125,16 +125,16 @@ namespace vcpkg::Metrics
path += L"\\kernel32.dll";
auto versz = GetFileVersionInfoSizeW(path.c_str(), nullptr);
if (versz == 0) return "";
if (versz == 0) return Strings::EMPTY;
std::vector<char> verbuf;
verbuf.resize(versz);
if (!GetFileVersionInfoW(path.c_str(), 0, static_cast<DWORD>(verbuf.size()), &verbuf[0])) return "";
if (!GetFileVersionInfoW(path.c_str(), 0, static_cast<DWORD>(verbuf.size()), &verbuf[0])) return Strings::EMPTY;
void* rootblock;
UINT rootblocksize;
if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return "";
if (!VerQueryValueW(&verbuf[0], L"\\", &rootblock, &rootblocksize)) return Strings::EMPTY;
auto rootblock_ffi = static_cast<VS_FIXEDFILEINFO*>(rootblock);
@ -377,7 +377,7 @@ namespace vcpkg::Metrics
path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe";
if (fs.exists(path)) return path;
return L"";
return Strings::WEMPTY;
}();
std::error_code ec;