Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
ae48acbb
Commit
ae48acbb
authored
Dec 12, 2018
by
Jonathan Dumaresq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove non usefull code. Add small description
parent
52f6fd1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
input_adapters.hpp
include/nlohmann/detail/input/input_adapters.hpp
+5
-5
No files found.
include/nlohmann/detail/input/input_adapters.hpp
View file @
ae48acbb
...
@@ -46,6 +46,10 @@ struct input_adapter_protocol
...
@@ -46,6 +46,10 @@ struct input_adapter_protocol
/// a type to simplify interfaces
/// a type to simplify interfaces
using
input_adapter_t
=
std
::
shared_ptr
<
input_adapter_protocol
>
;
using
input_adapter_t
=
std
::
shared_ptr
<
input_adapter_protocol
>
;
/*!
Input adapter for stdio file access. This adapter read only 1 byte and do not use any
buffer. This adapter is a very low level adapter. This adapter
*/
class
file_input_adapter
:
public
input_adapter_protocol
class
file_input_adapter
:
public
input_adapter_protocol
{
{
public
:
public
:
...
@@ -55,11 +59,7 @@ public:
...
@@ -55,11 +59,7 @@ public:
std
::
char_traits
<
char
>::
int_type
get_character
()
noexcept
override
std
::
char_traits
<
char
>::
int_type
get_character
()
noexcept
override
{
{
auto
res
=
fgetc
(
const_cast
<
FILE
*>
(
file
));
return
fgetc
(
const_cast
<
FILE
*>
(
file
));
if
(
res
==
EOF
)
return
std
::
char_traits
<
char
>::
eof
();
else
return
static_cast
<
std
::
char_traits
<
char
>::
int_type
>
(
res
);
}
}
private
:
private
:
/// the file pointer to read from
/// the file pointer to read from
...
...
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