osen / FL_Flex

FLTK row / column sizer
Other
12 stars 3 forks source link

Might consider using int instead of size_t #3

Open fire-eggs opened 3 years ago

fire-eggs commented 3 years ago

Warnings from Visual Studio building for 64-bit target:

FL_Flex.cpp(37,28): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(45,22): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(52,27): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(63,27): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(67,55): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(71,91): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(74,23): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(81,28): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(86,16): warning C4267: '-=': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(89,22): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(96,27): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(107,27): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(111,55): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(120,51): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data FL_Flex.cpp(123,23): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data

osen commented 3 years ago

Hi there. Apologies for the delay, this repo wasn't giving me notifications for some reason and my main FL_Flex development is happening on an internal company repo.

Many thanks for your feedback, I will certainly factor these in and also sync with the internal changes.

Eek, these weren't flagging up for our compiler (gcc based), but yes, you are right I should be using int.

fire-eggs commented 3 years ago

My thanks again for the project and your feedback. As a long-time user of the Visual Studio WinForms designer and Java Swing layouts, I am missing a useful layout mechanism in FLTK. FL_Flex is a big step forward!