Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
a2657385
Commit
a2657385
authored
6 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
time/FileTime: add `noexcept`
parent
5641c4ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
FileTime.hxx
src/time/FileTime.hxx
+4
-4
No files found.
src/time/FileTime.hxx
View file @
a2657385
...
...
@@ -37,20 +37,20 @@
#include <stdint.h>
static
constexpr
uint64_t
ConstructUint64
(
DWORD
lo
,
DWORD
hi
)
ConstructUint64
(
DWORD
lo
,
DWORD
hi
)
noexcept
{
return
uint64_t
(
lo
)
|
(
uint64_t
(
hi
)
<<
32
);
}
static
constexpr
time_t
FileTimeToTimeT
(
FILETIME
ft
)
FileTimeToTimeT
(
FILETIME
ft
)
noexcept
{
return
(
ConstructUint64
(
ft
.
dwLowDateTime
,
ft
.
dwHighDateTime
)
-
116444736000000000
)
/
10000000
;
}
static
inline
std
::
chrono
::
system_clock
::
time_point
FileTimeToChrono
(
FILETIME
ft
)
FileTimeToChrono
(
FILETIME
ft
)
noexcept
{
// TODO: eliminate the time_t roundtrip, preserve sub-second resolution
return
std
::
chrono
::
system_clock
::
from_time_t
(
FileTimeToTimeT
(
ft
));
...
...
@@ -58,7 +58,7 @@ FileTimeToChrono(FILETIME ft)
gcc_const
static
inline
std
::
chrono
::
seconds
DeltaFileTimeS
(
FILETIME
a
,
FILETIME
b
)
DeltaFileTimeS
(
FILETIME
a
,
FILETIME
b
)
noexcept
{
ULARGE_INTEGER
a2
,
b2
;
b2
.
LowPart
=
b
.
dwLowDateTime
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment