Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JPSreport
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
JuPedSim
JPSreport
Commits
3a3ae04e
Commit
3a3ae04e
authored
Jan 12, 2018
by
Mohcine Chraibi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
fix for empty line with only spaces
parent
9fbbb7b5
Pipeline
#5931
passed with stages
in 1 minute and 5 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
methods/PedData.cpp
methods/PedData.cpp
+4
-5
No files found.
methods/PedData.cpp
View file @
3a3ae04e
...
...
@@ -108,6 +108,7 @@ bool PedData::InitializeVariables(const string& filename)
int
pos_vd
=
5
;
//velocity direction
while
(
getline
(
fdata
,
line
)
)
{
boost
::
algorithm
::
trim
(
line
);
//looking for the framerate which is suppposed to be at the second position
if
(
line
[
0
]
==
'#'
)
{
...
...
@@ -153,10 +154,7 @@ bool PedData::InitializeVariables(const string& filename)
else
if
(
line
[
0
]
!=
'#'
&&
!
(
line
.
empty
())
)
{
static
int
once
=
1
;
if
(
lineNr
%
100000
==
0
)
std
::
cout
<<
"lineNr "
<<
lineNr
<<
std
::
endl
;
std
::
vector
<
std
::
string
>
strs
;
boost
::
algorithm
::
trim_right
(
line
);
boost
::
split
(
strs
,
line
,
boost
::
is_any_of
(
"
\t
"
),
boost
::
token_compress_on
);
if
(
once
)
// && strs.size() < 5
{
...
...
@@ -166,9 +164,10 @@ bool PedData::InitializeVariables(const string& filename)
Log
->
Write
(
"INFO: pos_x: %d"
,
pos_x
);
Log
->
Write
(
"INFO: pos_y: %d"
,
pos_y
);
Log
->
Write
(
"INFO: pos_z: %d"
,
pos_z
);
Log
->
Write
(
"INFO: pos_vd: %d"
,
pos_vd
);
std
::
cout
<<
"size= "
<<
strs
.
size
()
<<
" V: "
<<
_vComponent
<<
std
::
endl
;
// Log->Write("WARNING:\t assuming z=0 for all data");
}
_IdsTXT
.
push_back
(
atoi
(
strs
[
pos_id
].
c_str
()));
_FramesTXT
.
push_back
(
atoi
(
strs
[
pos_fr
].
c_str
()));
xs
.
push_back
(
atof
(
strs
[
pos_x
].
c_str
()));
...
...
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