mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-01 10:02:42 +00:00
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:
parent
73ce0c00e4
commit
517cd170c3
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user