Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fmt
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
fmt
Commits
55f5c9f2
Commit
55f5c9f2
authored
Feb 15, 2018
by
Lars Gullik Bjønnes
Committed by
Victor Zverovich
Feb 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use FMT_NULL instead of 0 is a few more places.
Found with GCC and -Wzero-as-null-pointer-constant
parent
e92ba107
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
include/fmt/core.h
include/fmt/core.h
+1
-1
include/fmt/posix.cc
include/fmt/posix.cc
+1
-1
include/fmt/posix.h
include/fmt/posix.h
+1
-1
No files found.
include/fmt/core.h
View file @
55f5c9f2
...
...
@@ -172,7 +172,7 @@ class basic_string_view {
typedef
Char
char_type
;
typedef
const
Char
*
iterator
;
FMT_CONSTEXPR
basic_string_view
()
FMT_NOEXCEPT
:
data_
(
0
),
size_
(
0
)
{}
FMT_CONSTEXPR
basic_string_view
()
FMT_NOEXCEPT
:
data_
(
FMT_NULL
),
size_
(
0
)
{}
/** Constructs a string reference object from a C string and a size. */
FMT_CONSTEXPR
basic_string_view
(
const
Char
*
s
,
size_t
size
)
FMT_NOEXCEPT
...
...
include/fmt/posix.cc
View file @
55f5c9f2
...
...
@@ -71,7 +71,7 @@ fmt::BufferedFile::~BufferedFile() FMT_NOEXCEPT {
fmt
::
BufferedFile
::
BufferedFile
(
fmt
::
cstring_view
filename
,
fmt
::
cstring_view
mode
)
{
FMT_RETRY_VAL
(
file_
,
FMT_SYSTEM
(
fopen
(
filename
.
c_str
(),
mode
.
c_str
())),
0
);
FMT_RETRY_VAL
(
file_
,
FMT_SYSTEM
(
fopen
(
filename
.
c_str
(),
mode
.
c_str
())),
FMT_NULL
);
if
(
!
file_
)
FMT_THROW
(
system_error
(
errno
,
"cannot open file {}"
,
filename
.
c_str
()));
}
...
...
include/fmt/posix.h
View file @
55f5c9f2
...
...
@@ -134,7 +134,7 @@ class BufferedFile {
public:
// Constructs a BufferedFile object which doesn't represent any file.
BufferedFile
()
FMT_NOEXCEPT
:
file_
(
0
)
{}
BufferedFile
()
FMT_NOEXCEPT
:
file_
(
FMT_NULL
)
{}
// Destroys the object closing the file it represents if any.
FMT_API
~
BufferedFile
()
FMT_DTOR_NOEXCEPT
;
...
...
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