Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuhao Liu
ogs
Commits
2b6aa2f1
Commit
2b6aa2f1
authored
10 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[TetGenInterface] Narrowed scope of pos_beg and pos_end.
parent
988b184d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
FileIO/TetGenInterface.cpp
+5
-6
5 additions, 6 deletions
FileIO/TetGenInterface.cpp
with
5 additions
and
6 deletions
FileIO/TetGenInterface.cpp
+
5
−
6
View file @
2b6aa2f1
...
...
@@ -303,7 +303,6 @@ bool TetGenInterface::parseNodes(std::ifstream &ins,
std
::
size_t
n_nodes
,
std
::
size_t
dim
)
{
std
::
size_t
pos_beg
,
pos_end
,
id
;
std
::
string
line
;
double
*
coordinates
(
static_cast
<
double
*>
(
alloca
(
sizeof
(
double
)
*
dim
)));
nodes
.
reserve
(
n_nodes
);
...
...
@@ -317,8 +316,9 @@ bool TetGenInterface::parseNodes(std::ifstream &ins,
return
false
;
}
pos_end
=
0
;
pos_beg
=
line
.
find_first_not_of
(
" "
,
pos_end
);
std
::
size_t
id
;
std
::
size_t
pos_end
=
0
;
std
::
size_t
pos_beg
=
line
.
find_first_not_of
(
" "
,
pos_end
);
pos_end
=
line
.
find_first_of
(
"
\n
"
,
pos_beg
);
if
(
line
.
empty
()
||
pos_beg
==
pos_end
||
line
.
compare
(
pos_beg
,
1
,
"#"
)
==
0
)
...
...
@@ -428,7 +428,6 @@ bool TetGenInterface::parseElements(std::ifstream& ins,
std
::
size_t
n_nodes_per_tet
,
bool
region_attribute
)
{
std
::
size_t
pos_beg
,
pos_end
;
std
::
string
line
;
std
::
size_t
*
ids
(
static_cast
<
size_t
*>
(
alloca
(
sizeof
(
size_t
)
*
n_nodes_per_tet
)));
elements
.
reserve
(
n_tets
);
...
...
@@ -443,8 +442,8 @@ bool TetGenInterface::parseElements(std::ifstream& ins,
return
false
;
}
pos_end
=
0
;
pos_beg
=
line
.
find_first_not_of
(
" "
,
pos_end
);
std
::
size_t
pos_end
=
0
;
std
::
size_t
pos_beg
=
line
.
find_first_not_of
(
" "
,
pos_end
);
pos_end
=
line
.
find_first_of
(
"
\n
"
,
pos_beg
);
if
(
line
.
empty
()
||
pos_beg
==
pos_end
||
line
.
compare
(
pos_beg
,
1
,
"#"
)
==
0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment