Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
David Gobbi
VTK
Commits
b55b661b
Commit
b55b661b
authored
4 weeks ago
by
Ben Boeckel
Browse files
Options
Downloads
Patches
Plain Diff
IO/LANLX3D: fix `performance-unnecessary-copy-initialization` lints
parent
86a5322c
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
IO/LANLX3D/X3D_reader.cxx
+3
-3
3 additions, 3 deletions
IO/LANLX3D/X3D_reader.cxx
with
3 additions
and
3 deletions
IO/LANLX3D/X3D_reader.cxx
+
3
−
3
View file @
b55b661b
...
...
@@ -46,13 +46,13 @@ streampos Reader::offset_of(const string& block)
size_t
num_cached_blocks
=
offset
.
size
();
if
(
num_cached_blocks
)
{
// some blocks cached; start after them...
string
last_block
=
TOP_BLOCK
[
num_cached_blocks
-
1
];
string
const
&
last_block
=
TOP_BLOCK
[
num_cached_blocks
-
1
];
if
(
file
.
tellg
()
<
offset
.
at
(
last_block
))
// ...unless beyond them
file
.
seekg
(
offset
.
at
(
last_block
));
// move to last cached block
}
for
(
size_t
i
=
num_cached_blocks
;
i
<
TOP_BLOCK
.
size
();
i
++
)
{
string
next_block
=
TOP_BLOCK
[
i
];
// look for next uncached block
string
const
&
next_block
=
TOP_BLOCK
[
i
];
// look for next uncached block
streampos
position
;
while
((
position
=
file
.
tellg
())
>
0
)
{
...
...
@@ -94,7 +94,7 @@ Reader::Reader(const string& filename_, const Version version_)
expect_starts_with
(
MAGIC_STRING
);
// match X3D header line
// Read Header Block
string
block
=
TOP_BLOCK
[
0
];
string
const
&
block
=
TOP_BLOCK
[
0
];
file
.
seekg
(
offset_of
(
block
));
expect_starts_with
(
block
);
...
...
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