Paul Melis wrote:
Hi,
Regarding rev 10233:
-----------------------
osg/Vec?b:
Also changed
typedef char value_type;
to
typedef signed char value_type;
In the case of a simple "char", SWIG assumes a string.
Using "signed char" instead of "char" does not change
the behaviour of the class."
-----------------------
Transforming char to signed char obviously changes the behaviour, as
you can no longer store values in same range anymore. E.g.
14:37|me...@juggle2:~/c/osg/svn/branches-2.8> cat t.cc
#include <osg/Vec3b>
#include <cstdio>
int main()
{
osg::Vec3b col;
col.x() = 255;
printf("%d\n", col.x());
}
14:37|me...@juggle2:~/c/osg/svn/branches-2.8> g++ -o t t.cc -I
~/osg2.8/include/
14:37|me...@juggle2:~/c/osg/svn/branches-2.8> ./t
-1
Arrghh, I can tell I didn't have much sleep last night. With type char
(instead of signed char) the result printed would also have been -1.
Never mind...
Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org