Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
OpenFlipper-Free
OpenFlipper-Free
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 3
    • Merge Requests 3
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • OpenFlipper-Free
  • OpenFlipper-FreeOpenFlipper-Free
  • Issues
  • #8

Closed
Open
Opened Nov 08, 2015 by Lukas Prediger@lprediger
  • Report abuse
  • New issue
Report abuse New issue

PolyLineT::get_custom_property Behaving Somewhat Unexpectedly

The get_custom_property method of the PolyLineT class comes in the two following variants:

  typedef void* CustomPropertyHandle;

  // property access by handle  (byte-wise)
  void get_custom_property(CustomPropertyHandle _property_handle, unsigned int _vertex, void* _dst) const;

  // property access by name (byte-wise),  (slower than by handle)
  void get_custom_property(const std::string& _name, unsigned int _vertex, void* _dst) const;

Note that the CustomPropertyHandle is defined as void*. This causes a call to get_custom_property("foo", ....) to be handled with the first variant. My guess is that the "foo" literal is in this case interpreted as a char array and implicitely casted to void* with higher precedence than std::string. I claim that this is undesired behavior and ask to investigate alternative solutions. The same problem should apply for related methods set_custom_property, custom_property_available and release_custom_property.

The problem was observed with the Microsoft Visual Studio 2013 compiler.

Assignee
Assign to
OpenFlipper 3.0
Milestone
OpenFlipper 3.0
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: OpenFlipper-Free/OpenFlipper-Free#8