Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
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
flatbuffers
Commits
9de08611
Commit
9de08611
authored
Feb 08, 2018
by
vglavnyy
Committed by
Wouter van Oortmerssen
Feb 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix vector_data failure under debug (#4606)
parent
b513db86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
stl_emulation.h
include/flatbuffers/stl_emulation.h
+2
-2
No files found.
include/flatbuffers/stl_emulation.h
View file @
9de08611
...
...
@@ -51,12 +51,12 @@ inline char string_back(const std::string &value) {
template
<
typename
T
>
inline
T
*
vector_data
(
std
::
vector
<
T
>
&
vector
)
{
// In some debug environments, operator[] does bounds checking, so &vector[0]
// can't be used.
return
&
(
*
vector
.
begin
())
;
return
vector
.
empty
()
?
nullptr
:
&
vector
[
0
]
;
}
template
<
typename
T
>
inline
const
T
*
vector_data
(
const
std
::
vector
<
T
>
&
vector
)
{
return
&
(
*
vector
.
begin
())
;
return
vector
.
empty
()
?
nullptr
:
&
vector
[
0
]
;
}
template
<
typename
T
,
typename
V
>
...
...
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