Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
2d873785
Commit
2d873785
authored
Dec 10, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astyle
parent
fec467da
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
22 deletions
+22
-22
include/spdlog/details/os.h
include/spdlog/details/os.h
+15
-15
include/spdlog/details/pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+1
-1
include/spdlog/fmt/bundled/format.h
include/spdlog/fmt/bundled/format.h
+6
-6
No files found.
include/spdlog/details/os.h
View file @
2d873785
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
#else // unix
#else // unix
#include <unistd.h>
#include <unistd.h>
#include <fcntl.h>
#include <fcntl.h>
#ifdef __linux__
#ifdef __linux__
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
#elif __FreeBSD__
#elif __FreeBSD__
#include <sys/thr.h> //Use thr_self() syscall under FreeBSD to get thread id
#include <sys/thr.h> //Use thr_self() syscall under FreeBSD to get thread id
#endif
#endif
#endif //unix
#endif //unix
...
@@ -145,14 +145,14 @@ SPDLOG_CONSTEXPR static int eol_size = sizeof(SPDLOG_EOL) - 1;
...
@@ -145,14 +145,14 @@ SPDLOG_CONSTEXPR static int eol_size = sizeof(SPDLOG_EOL) - 1;
inline
void
prevent_child_fd
(
FILE
*
f
)
inline
void
prevent_child_fd
(
FILE
*
f
)
{
{
#ifdef _WIN32
#ifdef _WIN32
auto
file_handle
=
(
HANDLE
)
_get_osfhandle
(
_fileno
(
f
));
auto
file_handle
=
(
HANDLE
)
_get_osfhandle
(
_fileno
(
f
));
if
(
!::
SetHandleInformation
(
file_handle
,
HANDLE_FLAG_INHERIT
,
0
))
if
(
!::
SetHandleInformation
(
file_handle
,
HANDLE_FLAG_INHERIT
,
0
))
throw
spdlog_ex
(
"SetHandleInformation failed"
,
errno
);
throw
spdlog_ex
(
"SetHandleInformation failed"
,
errno
);
#else
#else
auto
fd
=
fileno
(
f
);
auto
fd
=
fileno
(
f
);
if
(
fcntl
(
fd
,
F_SETFD
,
FD_CLOEXEC
)
==
-
1
)
if
(
fcntl
(
fd
,
F_SETFD
,
FD_CLOEXEC
)
==
-
1
)
throw
spdlog_ex
(
"fcntl with FD_CLOEXEC failed"
,
errno
);
throw
spdlog_ex
(
"fcntl with FD_CLOEXEC failed"
,
errno
);
#endif
#endif
}
}
...
@@ -164,16 +164,16 @@ inline int fopen_s(FILE** fp, const filename_t& filename, const filename_t& mode
...
@@ -164,16 +164,16 @@ inline int fopen_s(FILE** fp, const filename_t& filename, const filename_t& mode
*
fp
=
_wfsopen
((
filename
.
c_str
()),
mode
.
c_str
(),
_SH_DENYWR
);
*
fp
=
_wfsopen
((
filename
.
c_str
()),
mode
.
c_str
(),
_SH_DENYWR
);
#else
#else
*
fp
=
_fsopen
((
filename
.
c_str
()),
mode
.
c_str
(),
_SH_DENYWR
);
*
fp
=
_fsopen
((
filename
.
c_str
()),
mode
.
c_str
(),
_SH_DENYWR
);
#endif
#endif
#else //unix
#else //unix
*
fp
=
fopen
((
filename
.
c_str
()),
mode
.
c_str
());
*
fp
=
fopen
((
filename
.
c_str
()),
mode
.
c_str
());
#endif
#endif
#ifdef SPDLOG_PREVENT_CHILD_FD
#ifdef SPDLOG_PREVENT_CHILD_FD
if
(
*
fp
!=
nullptr
)
if
(
*
fp
!=
nullptr
)
prevent_child_fd
(
*
fp
);
prevent_child_fd
(
*
fp
);
#endif
#endif
return
*
fp
==
nullptr
;
return
*
fp
==
nullptr
;
}
}
...
...
include/spdlog/details/pattern_formatter_impl.h
View file @
2d873785
...
@@ -507,7 +507,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
...
@@ -507,7 +507,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
{
{
switch
(
flag
)
switch
(
flag
)
{
{
// logger name
// logger name
case
'n'
:
case
'n'
:
_formatters
.
push_back
(
std
::
unique_ptr
<
details
::
flag_formatter
>
(
new
details
::
name_formatter
()));
_formatters
.
push_back
(
std
::
unique_ptr
<
details
::
flag_formatter
>
(
new
details
::
name_formatter
()));
break
;
break
;
...
...
include/spdlog/fmt/bundled/format.h
View file @
2d873785
...
@@ -475,7 +475,7 @@ template <typename Impl, typename Char>
...
@@ -475,7 +475,7 @@ template <typename Impl, typename Char>
class
BasicPrintfArgFormatter
;
class
BasicPrintfArgFormatter
;
template
<
typename
CharType
,
template
<
typename
CharType
,
typename
ArgFormatter
=
fmt
::
ArgFormatter
<
CharType
>
>
typename
ArgFormatter
=
fmt
::
ArgFormatter
<
CharType
>
>
class
BasicFormatter
;
class
BasicFormatter
;
/**
/**
...
@@ -2647,15 +2647,15 @@ inline uint64_t make_type(const T &arg)
...
@@ -2647,15 +2647,15 @@ inline uint64_t make_type(const T &arg)
}
}
template
<
unsigned
N
,
bool
/*IsPacked*/
=
(
N
<
ArgList
::
MAX_PACKED_ARGS
)>
template
<
unsigned
N
,
bool
/*IsPacked*/
=
(
N
<
ArgList
::
MAX_PACKED_ARGS
)>
struct
ArgArray
;
struct
ArgArray
;
template
<
unsigned
N
>
template
<
unsigned
N
>
struct
ArgArray
<
N
,
true
/*IsPacked*/
>
struct
ArgArray
<
N
,
true
/*IsPacked*/
>
{
{
typedef
Value
Type
[
N
>
0
?
N
:
1
];
typedef
Value
Type
[
N
>
0
?
N
:
1
];
template
<
typename
Formatter
,
typename
T
>
template
<
typename
Formatter
,
typename
T
>
static
Value
make
(
const
T
&
value
)
static
Value
make
(
const
T
&
value
)
{
{
#ifdef __clang__
#ifdef __clang__
Value
result
=
MakeValue
<
Formatter
>
(
value
);
Value
result
=
MakeValue
<
Formatter
>
(
value
);
...
@@ -2667,7 +2667,7 @@ struct ArgArray<N, true/*IsPacked*/>
...
@@ -2667,7 +2667,7 @@ struct ArgArray<N, true/*IsPacked*/>
return
MakeValue
<
Formatter
>
(
value
);
return
MakeValue
<
Formatter
>
(
value
);
#endif
#endif
}
}
};
};
template
<
unsigned
N
>
template
<
unsigned
N
>
struct
ArgArray
<
N
,
false
/*IsPacked*/
>
struct
ArgArray
<
N
,
false
/*IsPacked*/
>
...
@@ -3513,7 +3513,7 @@ void BasicWriter<Char>::write_double(T value, const FormatSpec &spec)
...
@@ -3513,7 +3513,7 @@ void BasicWriter<Char>::write_double(T value, const FormatSpec &spec)
// MSVC's printf doesn't support 'F'.
// MSVC's printf doesn't support 'F'.
type
=
'f'
;
type
=
'f'
;
#endif
#endif
// Fall through.
// Fall through.
case
'E'
:
case
'E'
:
case
'G'
:
case
'G'
:
case
'A'
:
case
'A'
:
...
...
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