libais
libais copied to clipboard
Use size_t instead of int int64_t
Reported to me via email:
I was going through the current version of LibAIS and have some comments:
-
In many instances, it seems like it might be more appropriate to use a size_t instead of an explicit sized integer. For example, The VdmStream class returns an int when queried for the size. It would probably be more appropriate to return a size_t. Similarly, you are using int64_t for the type of line_number_, but size_t should be the integer size of the processor on which it is compiled, so that would presumably be more appropriate/ portable.
-
When compiling using -Weverything, clang gives me a bunch of warnings about weak vtables. The warnings are not really important, but it might be good to make those go away. The warnings about padding for alignment do not matter.
For the int64_t line_number_, I am going to stick with it. It's portable C++11 and if I go with an int and get a 32-bit int, many of the users will hit an error. I get > 150M lines per day, so hitting > 4G lines is pretty easy.