X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=inline;f=DEVELOPPER;h=fd8a67964977e52c0eae3955c520a58f77b13ed1;hb=f163238b46fdd5a54c1b6b70549ab9466c101d14;hp=03e858b44c7fa92c8eb0387bab53776a3493256a;hpb=684da0b8b7bd204d3c57f382763ba9c01a16fc1a;p=gdcm.git diff --git a/DEVELOPPER b/DEVELOPPER index 03e858b4..fd8a6796 100644 --- a/DEVELOPPER +++ b/DEVELOPPER @@ -343,12 +343,23 @@ gdcm coding style and religious/agnostic beliefs (proposition) typedef Header* HeaderPointer; HeaderPointer MyHeaderPointer; - One notorious counter example for non using C style inclusion concerns - exact-width intergers (since there seem to be no equivalent for C++). + exact-width integers (since there seem to be no equivalent for C++). When using exact-width integers use the typedef names defined by the Basic ISO C99: 7.18 Integer types i.e. int8_t int16_t int32_t int64_t (signed integers) and uint8_t uint16_t uint32_t uint64_t (unsigned integers). + Conversion table is then: + unsigned char -> uint8_t; + unsigned short -> uint16_t; + unsigned int -> uint32_t; + unsigned long -> uint32_t; + unsigned long long -> uint64_t; + (signed) char -> int8_t; + short -> int16_t; + int -> int32_t; + long -> int32_t; + long long -> int64_t; Hence do not use declarations like "unsigned int". With g++, accessing those typedef is achieved by the following #include