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
8890b935
Commit
8890b935
authored
Dec 06, 2017
by
Mike Bogdanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed merge conflicts
parent
daba1b6a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
64 deletions
+31
-64
src/json.hpp
src/json.hpp
+31
-64
No files found.
src/json.hpp
View file @
8890b935
...
...
@@ -8120,24 +8120,24 @@ class basic_json
case
value_t
:
:
object
:
{
AllocatorType
<
object_t
>
alloc
;
alloc
.
destroy
(
object
);
alloc
.
deallocate
(
object
,
1
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
destroy
(
alloc
,
object
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
deallocate
(
alloc
,
object
,
1
);
break
;
}
case
value_t
:
:
array
:
{
AllocatorType
<
array_t
>
alloc
;
alloc
.
destroy
(
array
);
alloc
.
deallocate
(
array
,
1
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
destroy
(
alloc
,
array
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
deallocate
(
alloc
,
array
,
1
);
break
;
}
case
value_t
:
:
string
:
{
AllocatorType
<
string_t
>
alloc
;
alloc
.
destroy
(
string
);
alloc
.
deallocate
(
string
,
1
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
destroy
(
alloc
,
string
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
deallocate
(
alloc
,
string
,
1
);
break
;
}
...
...
@@ -8940,39 +8940,6 @@ class basic_json
~
basic_json
()
{
assert_invariant
();
switch
(
m_type
)
{
case
value_t
:
:
object
:
{
AllocatorType
<
object_t
>
alloc
;
std
::
allocator_traits
<
decltype
(
alloc
)
>::
destroy
(
alloc
,
m_value
.
object
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
deallocate
(
alloc
,
m_value
.
object
,
1
);
break
;
}
case
value_t
:
:
array
:
{
AllocatorType
<
array_t
>
alloc
;
std
::
allocator_traits
<
decltype
(
alloc
)
>::
destroy
(
alloc
,
m_value
.
array
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
deallocate
(
alloc
,
m_value
.
array
,
1
);
break
;
}
case
value_t
:
:
string
:
{
AllocatorType
<
string_t
>
alloc
;
std
::
allocator_traits
<
decltype
(
alloc
)
>::
destroy
(
alloc
,
m_value
.
string
);
std
::
allocator_traits
<
decltype
(
alloc
)
>::
deallocate
(
alloc
,
m_value
.
string
,
1
);
break
;
}
default:
{
// all other types need no specific destructor
break
;
}
}
m_value
.
destroy
(
m_type
);
}
...
...
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