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
53d223b4
Commit
53d223b4
authored
Jan 11, 2021
by
Gaurav Vaidya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add constexpr to SPDLOG_LEVEL_NAMES declaration
for #1791
parent
aa2053a5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
include/spdlog/common-inl.h
include/spdlog/common-inl.h
+2
-2
include/spdlog/common.h
include/spdlog/common.h
+1
-1
include/spdlog/pattern_formatter-inl.h
include/spdlog/pattern_formatter-inl.h
+1
-1
No files found.
include/spdlog/common-inl.h
View file @
53d223b4
...
@@ -9,11 +9,11 @@
...
@@ -9,11 +9,11 @@
namespace
spdlog
{
namespace
spdlog
{
namespace
level
{
namespace
level
{
static
string_view_t
level_string_views
[]
SPDLOG_LEVEL_NAMES
;
static
FMT_CONSTEXPR
string_view_t
level_string_views
[]
SPDLOG_LEVEL_NAMES
;
static
const
char
*
short_level_names
[]
SPDLOG_SHORT_LEVEL_NAMES
;
static
const
char
*
short_level_names
[]
SPDLOG_SHORT_LEVEL_NAMES
;
SPDLOG_INLINE
string_view_t
&
to_string_view
(
spdlog
::
level
::
level_enum
l
)
SPDLOG_NOEXCEPT
SPDLOG_INLINE
const
string_view_t
&
to_string_view
(
spdlog
::
level
::
level_enum
l
)
SPDLOG_NOEXCEPT
{
{
return
level_string_views
[
l
];
return
level_string_views
[
l
];
}
}
...
...
include/spdlog/common.h
View file @
53d223b4
...
@@ -163,7 +163,7 @@ enum level_enum
...
@@ -163,7 +163,7 @@ enum level_enum
}
}
#endif
#endif
SPDLOG_API
string_view_t
&
to_string_view
(
spdlog
::
level
::
level_enum
l
)
SPDLOG_NOEXCEPT
;
SPDLOG_API
const
string_view_t
&
to_string_view
(
spdlog
::
level
::
level_enum
l
)
SPDLOG_NOEXCEPT
;
SPDLOG_API
const
char
*
to_short_c_str
(
spdlog
::
level
::
level_enum
l
)
SPDLOG_NOEXCEPT
;
SPDLOG_API
const
char
*
to_short_c_str
(
spdlog
::
level
::
level_enum
l
)
SPDLOG_NOEXCEPT
;
SPDLOG_API
spdlog
::
level
::
level_enum
from_str
(
const
std
::
string
&
name
)
SPDLOG_NOEXCEPT
;
SPDLOG_API
spdlog
::
level
::
level_enum
from_str
(
const
std
::
string
&
name
)
SPDLOG_NOEXCEPT
;
...
...
include/spdlog/pattern_formatter-inl.h
View file @
53d223b4
...
@@ -127,7 +127,7 @@ public:
...
@@ -127,7 +127,7 @@ public:
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
memory_buf_t
&
dest
)
override
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
memory_buf_t
&
dest
)
override
{
{
string_view_t
&
level_name
=
level
::
to_string_view
(
msg
.
level
);
const
string_view_t
&
level_name
=
level
::
to_string_view
(
msg
.
level
);
ScopedPadder
p
(
level_name
.
size
(),
padinfo_
,
dest
);
ScopedPadder
p
(
level_name
.
size
(),
padinfo_
,
dest
);
fmt_helper
::
append_string_view
(
level_name
,
dest
);
fmt_helper
::
append_string_view
(
level_name
,
dest
);
}
}
...
...
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