Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenMesh
OpenMesh
Commits
422b3dc6
Commit
422b3dc6
authored
Nov 23, 2015
by
Hans-Christian Ebke
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaks to HeapT.hh.
parent
daa256e3
Pipeline
#91
failed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
src/OpenMesh/Tools/Utils/HeapT.hh
src/OpenMesh/Tools/Utils/HeapT.hh
+14
-6
No files found.
src/OpenMesh/Tools/Utils/HeapT.hh
View file @
422b3dc6
...
...
@@ -79,6 +79,7 @@
#include "Config.hh"
#include <vector>
#include <OpenMesh/Core/System/omstream.hh>
#include <utility>
//== NAMESPACE ================================================================
...
...
@@ -148,13 +149,20 @@ public:
HeapT
()
:
HeapVector
()
{}
/// Construct with a given \c HeapIterface.
HeapT
(
const
HeapInterface
&
_interface
)
:
HeapVector
(),
interface_
(
_interface
)
HeapT
(
HeapInterface
_interface
)
:
HeapVector
(),
interface_
(
std
::
move
(
_interface
)
)
{}
/// Destructor.
~
HeapT
(){};
HeapInterface
&
getInterface
()
{
return
interface_
;
}
const
HeapInterface
&
getInterface
()
const
{
return
interface_
;
}
/// clear the heap
void
clear
()
{
HeapVector
::
clear
();
}
...
...
@@ -187,14 +195,14 @@ public:
HeapEntry
front
()
const
{
assert
(
!
empty
());
return
entry
(
0
);
return
HeapVector
::
front
(
);
}
/// delete the first entry
void
pop_front
()
{
assert
(
!
empty
());
reset_heap_position
(
entry
(
0
));
reset_heap_position
(
HeapVector
::
front
(
));
if
(
size
()
>
1
)
{
entry
(
0
,
entry
(
size
()
-
1
));
...
...
@@ -338,9 +346,9 @@ void
HeapT
<
HeapEntry
,
HeapInterface
>::
downheap
(
size_t
_idx
)
{
HeapEntry
h
=
entry
(
_idx
);
const
HeapEntry
h
=
entry
(
_idx
);
size_t
childIdx
;
size_t
s
=
size
();
const
size_t
s
=
size
();
while
(
_idx
<
s
)
{
...
...
Hans-Christian Ebke
@ebke
mentioned in commit
96018ca4
·
Nov 25, 2015
mentioned in commit
96018ca4
mentioned in commit 96018ca4ab083af238d645eba568473fcb2129ea
Toggle commit list
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