}
if (vm.count("fmt-countertype")) {
- if (vm["fmt-countertype"].as<std::wstring>().compare(L"double"))
- printInfo.dwRequestedType = PDH_FMT_DOUBLE;
- else if (vm["fmt-countertype"].as<std::wstring>().compare(L"int64"))
+ if (!vm["fmt-countertype"].as<std::wstring>().compare(L"int64"))
printInfo.dwRequestedType = PDH_FMT_LARGE;
- else if (vm["fmt-countertype"].as<std::wstring>().compare(L"long"))
+ else if (!vm["fmt-countertype"].as<std::wstring>().compare(L"long"))
printInfo.dwRequestedType = PDH_FMT_LONG;
- else {
+ else if (vm["fmt-countertype"].as<std::wstring>().compare(L"double")) {
std::wcout << "Unknown value type " << vm["fmt-countertype"].as<std::wstring>() << '\n';
return FALSE;
}
switch (pI.dwRequestedType)
{
- case (PDH_FMT_LONG):
+ case (PDH_FMT_LONG) :
pI.dValue = pDisplayValues[0].FmtValue.longValue;
+ break;
case (PDH_FMT_LARGE) :
pI.dValue = pDisplayValues[0].FmtValue.largeValue;
+ break;
default:
pI.dValue = pDisplayValues[0].FmtValue.doubleValue;
+ break;
}
delete[]pDisplayValues;