Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    HashMap::FindOrCreateEntry() req. c4d_misc::Bool

    Scheduled Pinned Locked Moved Bugs
    1 Posts 0 Posters 424 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      On 17/07/2013 at 04:44, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R14 
      Platform:      
      Language(s) :     C++  ;

      ---------
      The hasmap class is pretty cool, but one thing sucks: Its ~::FindOrCreateEntry() method expects
      c4d_misc::Bool as the second parameter instead of Bool which is why this code fails to compile:

      Bool created = FALSE;
      MapType::Entry* e = map.FindOrCreateEntry(25, created);
      

      While these two snippets work:

      c4d_misc::Bool created = FALSE;
      MapType::Entry* e = map.FindOrCreateEntry(25, created);
        
      // or
        
      Bool created = FALSE;
      MapType::Entry* e = map.FindOrCreateEntry(25, (c4d_misc::Bool&) created);
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post