bpeikes/pioneer-controlapp-web 0

Web interfaces for Pioneer devices

issue commentTencent/rapidjson

Changing SizeType to size_t across project

I’m not sure what that would look like as you have to also add code. According to the documentation, you have to define a macro, and add code.

Is there a macro that can be set to the type you want to use?

What would that look like for instance with gcc?

On Tue, Aug 4, 2020 at 6:09 AM Milo Yip wrote:

You may change the compilation options in a project to define macro globally.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe .


comment created time in 3 months

issue openedTencent/rapidjson

Changing SizeType to size_t across project

Any place in our project where we use rapidjson, we include the rapidson headers that are needed. We have probably 40 files that include it. According the documentation, it looks like if we want to use size_t for SizeType, we would have to add a define and the struct definition for the type. This seems error prone, as you could end up using different types for SizeType in different files.

I suppose we could have our own "project_rapidjson.h" file that we would include anywhere we use rapidjson, and remember to include it first, but it also might make sense for there to be a #define for at least the use of std::size_t, since it's common. Then the macro could be used when setting up your project, instead of everywhere.

Maybe a RAPIDJSON_USE_SIZET? Thoughts?

created time in 3 months