Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
OpenMesh
OpenMesh
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 11
    • Issues 11
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenMesh
  • OpenMeshOpenMesh
  • Issues
  • #54

Closed
Open
Opened May 08, 2018 by Matthias Möller@moellerContributor

get_property inconsistent return value over build configs

Hi, consider the following code:

Mesh mesh;
std::string = "prop";

VPropHandleT<float> prop_float;
mesh.add_property(prop_float, name);

VPropHandleT<Vec3d> prop_vec; //<-- different type
bool result = mesh.get_property_handle(prop_vec, name); //<-- request handle with wrong type 

The output in result depends on the Build Configuration.

  • In Debug mode, following holds: result==false
  • In Release mode, following holds: result==true

It is because in "PropertyContainer.h", the type check is disabled in Release mode (line 126-128).

The function should return the same value over the different build configurations.

(I would prefer the type check enabled, because it seems to be complex, checking outside of the PropertyContainer if the type of your prophandle is the correct one

edit or provide an additional member-function "has_type", or something like this, skipping the dynamic_cast in get_property)

Edited May 09, 2018 by Matthias Möller
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: OpenMesh/OpenMesh#54