Zero-initialize chrono duration objects

The default duration constructor does not zero-initialize the object, we need to
do that manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Pavel Labath 2016-11-09 11:43:57 +00:00
parent 73ce0c00e4
commit 517cd170c3
2 changed files with 3 additions and 3 deletions

View File

@ -60,8 +60,8 @@ public:
private:
// Options that matches the setters above.
std::string Path;
std::chrono::seconds Expiration;
std::chrono::seconds Interval;
std::chrono::seconds Expiration = std::chrono::seconds::zero();
std::chrono::seconds Interval = std::chrono::seconds::zero();
unsigned PercentageOfAvailableSpace = 0;
};

View File

@ -66,7 +66,7 @@ static std::pair<std::chrono::microseconds, std::chrono::microseconds> getRUsage
return { toDuration(RU.ru_utime), toDuration(RU.ru_stime) };
#else
#warning Cannot get usage times on this platform
return {};
return { std::chrono::microseconds::zero(), std::chrono::microseconds::zero() };
#endif
}