• zaphod
    link
    fedilink
    arrow-up
    10
    ·
    14 hours ago

    You don’t need to cast the return value from malloc.

    • addie@feddit.uk
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      13 hours ago

      True. Although given how easy it is to cast void pointers to the wrong damn thing, it would be nice if you did, makes refactoring much easier. Makes me appreciate std::any all the more.