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
9dae3eac
Commit
9dae3eac
authored
Jan 04, 2018
by
Bastien Brunnenstein
Committed by
Wouter van Oortmerssen
Jan 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error in ConCatPathFileName (#4575)
parent
99a8a68a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
stl_emulation.h
include/flatbuffers/stl_emulation.h
+4
-0
util.h
include/flatbuffers/util.h
+1
-1
No files found.
include/flatbuffers/stl_emulation.h
View file @
9dae3eac
...
@@ -38,6 +38,10 @@ namespace flatbuffers {
...
@@ -38,6 +38,10 @@ namespace flatbuffers {
// Retrieve ::back() from a string in a way that is compatible with pre C++11
// Retrieve ::back() from a string in a way that is compatible with pre C++11
// STLs (e.g stlport).
// STLs (e.g stlport).
inline
char
&
string_back
(
std
::
string
&
value
)
{
return
value
[
value
.
length
()
-
1
];
}
inline
char
string_back
(
const
std
::
string
&
value
)
{
inline
char
string_back
(
const
std
::
string
&
value
)
{
return
value
[
value
.
length
()
-
1
];
return
value
[
value
.
length
()
-
1
];
}
}
...
...
include/flatbuffers/util.h
View file @
9dae3eac
...
@@ -216,7 +216,7 @@ inline std::string ConCatPathFileName(const std::string &path,
...
@@ -216,7 +216,7 @@ inline std::string ConCatPathFileName(const std::string &path,
const
std
::
string
&
filename
)
{
const
std
::
string
&
filename
)
{
std
::
string
filepath
=
path
;
std
::
string
filepath
=
path
;
if
(
filepath
.
length
())
{
if
(
filepath
.
length
())
{
char
filepath_last_character
=
string_back
(
filepath
);
char
&
filepath_last_character
=
string_back
(
filepath
);
if
(
filepath_last_character
==
kPathSeparatorWindows
)
{
if
(
filepath_last_character
==
kPathSeparatorWindows
)
{
filepath_last_character
=
kPathSeparator
;
filepath_last_character
=
kPathSeparator
;
}
else
if
(
filepath_last_character
!=
kPathSeparator
)
{
}
else
if
(
filepath_last_character
!=
kPathSeparator
)
{
...
...
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