Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
540f8653
Commit
540f8653
authored
May 11, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Normalized copyright message
parent
46ef71e3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
19 deletions
+33
-19
common-inl.h
include/spdlog/common-inl.h
+20
-2
common.h
include/spdlog/common.h
+8
-16
spdlog.cpp
src/spdlog.cpp
+5
-1
No files found.
include/spdlog/common-inl.h
View file @
540f8653
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
\ No newline at end of file
#pragma once
SPDLOG_INLINE
spdlog
::
spdlog_ex
::
spdlog_ex
(
std
::
string
msg
)
:
msg_
(
std
::
move
(
msg
))
{
}
SPDLOG_INLINE
spdlog
::
spdlog_ex
::
spdlog_ex
(
const
std
::
string
&
msg
,
int
last_errno
)
{
fmt
::
memory_buffer
outbuf
;
fmt
::
format_system_error
(
outbuf
,
last_errno
,
msg
);
msg_
=
fmt
::
to_string
(
outbuf
);
}
SPDLOG_INLINE
const
char
*
spdlog
::
spdlog_ex
::
what
()
const
SPDLOG_NOEXCEPT
{
return
msg_
.
c_str
();
}
include/spdlog/common.h
View file @
540f8653
...
...
@@ -191,22 +191,9 @@ enum class pattern_time_type
class
spdlog_ex
:
public
std
::
exception
{
public
:
explicit
spdlog_ex
(
std
::
string
msg
)
:
msg_
(
std
::
move
(
msg
))
{
}
spdlog_ex
(
const
std
::
string
&
msg
,
int
last_errno
)
{
fmt
::
memory_buffer
outbuf
;
fmt
::
format_system_error
(
outbuf
,
last_errno
,
msg
);
msg_
=
fmt
::
to_string
(
outbuf
);
}
const
char
*
what
()
const
SPDLOG_NOEXCEPT
override
{
return
msg_
.
c_str
();
}
explicit
spdlog_ex
(
std
::
string
msg
);
spdlog_ex
(
const
std
::
string
&
msg
,
int
last_errno
);
const
char
*
what
()
const
SPDLOG_NOEXCEPT
override
;
private
:
std
::
string
msg_
;
...
...
@@ -246,3 +233,7 @@ std::unique_ptr<T> make_unique(Args &&... args)
#endif
}
// namespace details
}
// namespace spdlog
#ifndef SPDLOG_STATIC_LIB
#include "commont-inl.h"
#endif
\ No newline at end of file
src/spdlog.cpp
View file @
540f8653
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#include "spdlog/spdlog.h"
#include <mutex>
#include "spdlog/common.h"
#include "spdlog/common-inl.h"
#include "spdlog/details/null_mutex.h"
...
...
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