Giter Site home page Giter Site logo

Comments (2)

jbmouret avatar jbmouret commented on June 21, 2024

It would make sense to not use a void*...

-- JBM

On Thu, Jul 7, 2016 at 10:01 AM Dorian Goepp [email protected]
wrote:

Very little importance detail here. Since we use a pointer for extra
damage information, would it make sense to use a pointer to const, or even
a const pointer to const ?

The code concerned is in hexapod_dart -> hexapod.hpp
https://github.com/resibots/hexapod_simu/blob/master/hexapod_dart/include/hexapod_dart/hexapod.hpp
:

struct HexapodDamage {
HexapodDamage() {}
HexapodDamage(const std::string& type, const std::string& data, void* extra = nullptr) : type(type), data(data), extra(extra) {}

    std::string type;
    std::string data;
    void* extra = nullptr;

};


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#20, or mute the thread
https://github.com/notifications/unsubscribe/AFu8v84ckYyr2xUK0__mcl7LZvjWyng7ks5qTK_sgaJpZM4JG0tf
.

from hexapod_simu.

costashatz avatar costashatz commented on June 21, 2024

It would make sense to not use a void*

But I want it to be able to add anything of any type.. I could make it a string and then parse it..

from hexapod_simu.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.