emilk / loguru

A lightweight C++ logging library
The Unlicense
1.77k stars 256 forks source link

Use size_t type for get_thread_name length #166

Closed ajkhoury closed 3 years ago

ajkhoury commented 3 years ago

This minor change prevents the MSVC warning C4244 conversion from 'unsigned __int64' to 'const size_t', possible loss of data from being emitted on 32-bit builds

ajkhoury commented 3 years ago

I notice this fails to build on ubuntu due to no preincluded standard header which includes the size_t definition. I can alternatively just disable the warning, redefine the size_t type, or I can include a standard header such as stddef.h inside of loguru.hpp. I would prefer the latter.

ajkhoury commented 3 years ago

@emilk Have you had a chance to review my updated changes yet? Thanks!