Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
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
json
Commits
45810082
Unverified
Commit
45810082
authored
Dec 16, 2020
by
Niels Lohmann
Committed by
GitHub
Dec 16, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2536 from nlohmann/shadowing
Fix a shadowing warning
parents
2fc1f694
5cc5285f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
include/nlohmann/json.hpp
include/nlohmann/json.hpp
+6
-6
single_include/nlohmann/json.hpp
single_include/nlohmann/json.hpp
+6
-6
No files found.
include/nlohmann/json.hpp
View file @
45810082
...
...
@@ -923,14 +923,14 @@ class basic_json
AllocatorType
<
T
>
alloc
;
using
AllocatorTraits
=
std
::
allocator_traits
<
AllocatorType
<
T
>>
;
auto
deleter
=
[
&
](
T
*
obj
ect
)
auto
deleter
=
[
&
](
T
*
obj
)
{
AllocatorTraits
::
deallocate
(
alloc
,
obj
ect
,
1
);
AllocatorTraits
::
deallocate
(
alloc
,
obj
,
1
);
};
std
::
unique_ptr
<
T
,
decltype
(
deleter
)
>
obj
ect
(
AllocatorTraits
::
allocate
(
alloc
,
1
),
deleter
);
AllocatorTraits
::
construct
(
alloc
,
obj
ect
.
get
(),
std
::
forward
<
Args
>
(
args
)...);
JSON_ASSERT
(
obj
ect
!=
nullptr
);
return
obj
ect
.
release
();
std
::
unique_ptr
<
T
,
decltype
(
deleter
)
>
obj
(
AllocatorTraits
::
allocate
(
alloc
,
1
),
deleter
);
AllocatorTraits
::
construct
(
alloc
,
obj
.
get
(),
std
::
forward
<
Args
>
(
args
)...);
JSON_ASSERT
(
obj
!=
nullptr
);
return
obj
.
release
();
}
////////////////////////
...
...
single_include/nlohmann/json.hpp
View file @
45810082
...
...
@@ -17495,14 +17495,14 @@ class basic_json
AllocatorType
<
T
>
alloc
;
using
AllocatorTraits
=
std
::
allocator_traits
<
AllocatorType
<
T
>>
;
auto
deleter
=
[
&
](
T
*
obj
ect
)
auto
deleter
=
[
&
](
T
*
obj
)
{
AllocatorTraits
::
deallocate
(
alloc
,
obj
ect
,
1
);
AllocatorTraits
::
deallocate
(
alloc
,
obj
,
1
);
};
std
::
unique_ptr
<
T
,
decltype
(
deleter
)
>
obj
ect
(
AllocatorTraits
::
allocate
(
alloc
,
1
),
deleter
);
AllocatorTraits
::
construct
(
alloc
,
obj
ect
.
get
(),
std
::
forward
<
Args
>
(
args
)...);
JSON_ASSERT
(
obj
ect
!=
nullptr
);
return
obj
ect
.
release
();
std
::
unique_ptr
<
T
,
decltype
(
deleter
)
>
obj
(
AllocatorTraits
::
allocate
(
alloc
,
1
),
deleter
);
AllocatorTraits
::
construct
(
alloc
,
obj
.
get
(),
std
::
forward
<
Args
>
(
args
)...);
JSON_ASSERT
(
obj
!=
nullptr
);
return
obj
.
release
();
}
////////////////////////
...
...
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