GithubHelp home page GithubHelp logo

Comments (3)

dumblob avatar dumblob commented on July 20, 2024

grep -Er 'define NK_MEMSET' src/ is my friend 😉:

src/nuklear_internal.h:#define NK_MEMSET nk_memset
master 0$ grep -Er 'NK_UINT_DRAW_INDEX' src/
src/nuklear.h:#ifdef NK_UINT_DRAW_INDEX
src/HEADER:/// NK_UINT_DRAW_INDEX              | Defining this will set the size of vertex index elements when using NK_VERTEX_BUFFER_OUTPUT to 32bit instead of the default of 16bit
src/HEADER:///     - NK_UINT_DRAW_INDEX
master 0$ grep -Er 'nk_memcopy' src/
src/nuklear_internal.h:#define NK_MEMCPY nk_memcopy
src/nuklear_internal.h:NK_LIB void* nk_memcopy(void *dst, const void *src, nk_size n);
src/nuklear_util.c:nk_memcopy(void *dst0, const void *src0, nk_size length)

from nuklear.

dumblob avatar dumblob commented on July 20, 2024

Btw. why not use directly #ifdef NK_MEMSET directly and introduce another "chained" define #ifdef NK_DEF_MEMSET? Same for NK_MEMCPY. Or maybe I don't understand the patch enough 😢...

from nuklear.

Nielsbishere avatar Nielsbishere commented on July 20, 2024

The point is that there's a few checks like this:
if(sizeof(nk_draw_index) > 2) which in c++17 with /Wall /Werr doesn't compile since it should be constexpr. This expression can be done by a simple ifdef, because it is only larger if it's defined as an int. I myself replace memcpy and memset by std::memcpy and std::memset, so it shouldn't even try to compile those IMO.

from nuklear.

Related Issues (20)

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.