aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/metrics.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-08-28 19:29:55 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-08-28 19:54:01 -0700
commit6684240090512f745bf7530b2fb4bcd31c3fb02e (patch)
treedba9143ed0d1a480aa8f147d6275af4f4aecfa9a /toolsrc/src/metrics.cpp
parent992f192c5e937f22877117e64ff7a38a6447c4bc (diff)
downloadvcpkg-6684240090512f745bf7530b2fb4bcd31c3fb02e.tar.gz
vcpkg-6684240090512f745bf7530b2fb4bcd31c3fb02e.zip
Use Strings::EMPTY
Diffstat (limited to 'toolsrc/src/metrics.cpp')
-rw-r--r--toolsrc/src/metrics.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp
index 6263c0fcb..8a7d02a30 100644
--- a/toolsrc/src/metrics.cpp
+++ b/toolsrc/src/metrics.cpp
@@ -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;