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
a8169a3d
Commit
a8169a3d
authored
Apr 10, 2020
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang-format
parent
9ba7fc94
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
bench/bench.cpp
bench/bench.cpp
+3
-3
include/spdlog/cfg/argv.h
include/spdlog/cfg/argv.h
+1
-1
include/spdlog/details/fmt_helper.h
include/spdlog/details/fmt_helper.h
+1
-1
tests/test_daily_logger.cpp
tests/test_daily_logger.cpp
+1
-1
tests/test_mpmc_q.cpp
tests/test_mpmc_q.cpp
+1
-1
tests/test_pattern_formatter.cpp
tests/test_pattern_formatter.cpp
+2
-2
tests/test_registry.cpp
tests/test_registry.cpp
+2
-2
No files found.
bench/bench.cpp
View file @
a8169a3d
...
...
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
threads
=
std
::
stoi
(
argv
[
2
]);
}
if
(
threads
>
max_threads
)
if
(
threads
>
max_threads
)
{
throw
std
::
runtime_error
(
fmt
::
format
(
"Number of threads exceeds maximum({}})"
,
max_threads
));
}
...
...
@@ -139,9 +139,9 @@ int main(int argc, char *argv[])
void
bench
(
int
howmany
,
std
::
shared_ptr
<
spdlog
::
logger
>
log
)
{
using
std
::
chrono
::
high_resolution_clock
;
using
std
::
chrono
::
duration
;
using
std
::
chrono
::
duration_cast
;
using
std
::
chrono
::
high_resolution_clock
;
auto
start
=
high_resolution_clock
::
now
();
for
(
auto
i
=
0
;
i
<
howmany
;
++
i
)
...
...
@@ -158,9 +158,9 @@ void bench(int howmany, std::shared_ptr<spdlog::logger> log)
void
bench_mt
(
int
howmany
,
std
::
shared_ptr
<
spdlog
::
logger
>
log
,
int
thread_count
)
{
using
std
::
chrono
::
high_resolution_clock
;
using
std
::
chrono
::
duration
;
using
std
::
chrono
::
duration_cast
;
using
std
::
chrono
::
high_resolution_clock
;
std
::
vector
<
std
::
thread
>
threads
;
threads
.
reserve
(
thread_count
);
...
...
include/spdlog/cfg/argv.h
View file @
a8169a3d
...
...
@@ -38,7 +38,7 @@ void load_argv_levels(int argc, const char **argv)
void
load_argv_levels
(
int
argc
,
char
**
argv
)
{
load_argv_levels
(
argc
,
const_cast
<
const
char
**>
(
argv
));
load_argv_levels
(
argc
,
const_cast
<
const
char
**>
(
argv
));
}
}
// namespace cfg
...
...
include/spdlog/details/fmt_helper.h
View file @
a8169a3d
...
...
@@ -63,7 +63,7 @@ template<typename T>
inline
void
pad_uint
(
T
n
,
unsigned
int
width
,
memory_buf_t
&
dest
)
{
static_assert
(
std
::
is_unsigned
<
T
>::
value
,
"pad_uint must get unsigned T"
);
for
(
auto
digits
=
count_digits
(
n
);
digits
<
width
;
digits
++
)
for
(
auto
digits
=
count_digits
(
n
);
digits
<
width
;
digits
++
)
{
dest
.
push_back
(
'0'
);
}
...
...
tests/test_daily_logger.cpp
View file @
a8169a3d
...
...
@@ -113,7 +113,7 @@ static void test_rotate(int days_to_run, uint16_t max_days, uint16_t expected_n_
using
spdlog
::
log_clock
;
using
spdlog
::
details
::
log_msg
;
using
spdlog
::
sinks
::
daily_file_sink_st
;
prepare_logdir
();
std
::
string
basename
=
"test_logs/daily_rotate.txt"
;
...
...
tests/test_mpmc_q.cpp
View file @
a8169a3d
...
...
@@ -86,7 +86,7 @@ TEST_CASE("full_queue", "[mpmc_blocking_q]")
spdlog
::
details
::
mpmc_blocking_queue
<
int
>
q
(
q_size
);
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
q_size
);
i
++
)
{
q
.
enqueue
(
i
+
0
);
// i+0 to force rvalue and avoid tidy warnings on the same time if we std::move(i) instead
q
.
enqueue
(
i
+
0
);
// i+0 to force rvalue and avoid tidy warnings on the same time if we std::move(i) instead
}
q
.
enqueue_nowait
(
123456
);
...
...
tests/test_pattern_formatter.cpp
View file @
a8169a3d
...
...
@@ -308,7 +308,7 @@ TEST_CASE("clone-formatter-2", "[pattern_formatter]")
class
custom_test_flag
:
public
spdlog
::
custom_flag_formatter
{
public:
explicit
custom_test_flag
(
std
::
string
txt
)
explicit
custom_test_flag
(
std
::
string
txt
)
:
some_txt
{
std
::
move
(
txt
)}
{}
...
...
@@ -359,7 +359,7 @@ TEST_CASE("clone-custom_formatter", "[pattern_formatter]")
#ifdef _WIN32
static
const
char
*
const
test_path
=
"
\\
a
\\
b
\\
myfile.cpp"
;
#else
static
const
char
*
const
test_path
=
"/a/b//myfile.cpp"
;
static
const
char
*
const
test_path
=
"/a/b//myfile.cpp"
;
#endif
TEST_CASE
(
"short filename formatter-1"
,
"[pattern_formatter]"
)
...
...
tests/test_registry.cpp
View file @
a8169a3d
#include "includes.h"
static
const
char
*
const
tested_logger_name
=
"null_logger"
;
static
const
char
*
const
tested_logger_name2
=
"null_logger2"
;
static
const
char
*
const
tested_logger_name
=
"null_logger"
;
static
const
char
*
const
tested_logger_name2
=
"null_logger2"
;
#ifndef SPDLOG_NO_EXCEPTIONS
TEST_CASE
(
"register_drop"
,
"[registry]"
)
...
...
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