Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenMesh
OpenMesh
Commits
05c01593
Commit
05c01593
authored
Nov 22, 2019
by
Max Lyon
Browse files
fix property manager property access for bool properties
parent
5c99f603
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenMesh/Core/Utils/PropertyManager.hh
View file @
05c01593
...
...
@@ -80,10 +80,12 @@ template<typename PROPTYPE, typename MeshT = int>
class
PropertyManager
{
public:
using
Value
=
typename
PROPTYPE
::
Value
;
using
value_type
=
typename
PROPTYPE
::
value_type
;
using
Handle
=
typename
PROPTYPE
::
Handle
;
using
Self
=
PropertyManager
<
PROPTYPE
,
MeshT
>
;
using
Value
=
typename
PROPTYPE
::
Value
;
using
value_type
=
typename
PROPTYPE
::
value_type
;
using
Handle
=
typename
PROPTYPE
::
Handle
;
using
Self
=
PropertyManager
<
PROPTYPE
,
MeshT
>
;
using
Reference
=
typename
PROPTYPE
::
reference
;
using
ConstReference
=
typename
PROPTYPE
::
const_reference
;
private:
// Mesh properties (MPropHandleT<...>) are stored differently than the other properties.
...
...
@@ -101,10 +103,10 @@ class PropertyManager {
static
void
swap
(
PropertyManager
<
PROPTYPE
,
MeshT
>&
from
,
PropertyManager2
&
to
)
{
std
::
swap
(
*
to
,
*
from
);
}
static
c
onst
Value
&
access_property_const
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
)
{
static
C
onst
Reference
access_property_const
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
)
{
return
mesh
.
property
(
prop_handle
);
}
static
Value
&
access_property
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
)
{
static
Reference
access_property
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
)
{
return
mesh
.
property
(
prop_handle
);
}
};
...
...
@@ -121,10 +123,10 @@ class PropertyManager {
lhs
.
mesh
().
property
(
lhs
.
prop_
).
resize
(
lhs
.
mesh
().
template
n_elements
<
Handle
>());
rhs
.
mesh
().
property
(
rhs
.
prop_
).
resize
(
rhs
.
mesh
().
template
n_elements
<
Handle
>());
}
static
c
onst
Value
&
access_property_const
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
handle
)
{
static
C
onst
Reference
access_property_const
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
handle
)
{
return
mesh
.
property
(
prop_handle
,
handle
);
}
static
Value
&
access_property
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
handle
)
{
static
Reference
access_property
(
PolyConnectivity
&
mesh
,
const
PROPTYPE
&
prop_handle
,
const
Handle
&
handle
)
{
return
mesh
.
property
(
prop_handle
,
handle
);
}
};
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment