Scorpio's egbbprobe (bugs??)
Posted: 24 Jun 2008, 11:57
Hi all,
going through the source of the egbbso.so, I recently downloaded from:
http://dshawul.googlepages.com/home
I have noticed that "size" in "EGBB::decode()", and "block_size" in "EGBB::get_score" are redeclared. Correct me if I am wrong on this. My previous experience suggests to me that this might turn into some nasty bugs later on. By the way, turning on some warnings in g++, I get:
...
egbbdll.cpp: In member function ‘UBMP64 EGBB::read_bytes(int)’:
egbbdll.cpp:465: warning: use of old-style cast
egbbdll.cpp:467: warning: use of old-style cast
egbbdll.cpp: In member function ‘int EGBB::decode(UBMP8*, UBMP8*, UBMP32)’:
egbbdll.cpp:479: warning: declaration of ‘size’ shadows a member of 'this'
egbbdll.cpp:536: warning: use of old-style cast
egbbdll.cpp: In member function ‘int EGBB::get_score(UBMP32, SEARCHER*)’:
egbbdll.cpp:572: warning: declaration of ‘block_size’ shadows a member of 'this'
egbbdll.cpp:591: warning: declaration of ‘block_size’ shadows a member of 'this'
...
Another thing, what's up with the old style casts? It would be much cleaner to use static_cast<...>(...), don't you think?
Thanks,
Jason Lavigne
going through the source of the egbbso.so, I recently downloaded from:
http://dshawul.googlepages.com/home
I have noticed that "size" in "EGBB::decode()", and "block_size" in "EGBB::get_score" are redeclared. Correct me if I am wrong on this. My previous experience suggests to me that this might turn into some nasty bugs later on. By the way, turning on some warnings in g++, I get:
...
egbbdll.cpp: In member function ‘UBMP64 EGBB::read_bytes(int)’:
egbbdll.cpp:465: warning: use of old-style cast
egbbdll.cpp:467: warning: use of old-style cast
egbbdll.cpp: In member function ‘int EGBB::decode(UBMP8*, UBMP8*, UBMP32)’:
egbbdll.cpp:479: warning: declaration of ‘size’ shadows a member of 'this'
egbbdll.cpp:536: warning: use of old-style cast
egbbdll.cpp: In member function ‘int EGBB::get_score(UBMP32, SEARCHER*)’:
egbbdll.cpp:572: warning: declaration of ‘block_size’ shadows a member of 'this'
egbbdll.cpp:591: warning: declaration of ‘block_size’ shadows a member of 'this'
...
Another thing, what's up with the old style casts? It would be much cleaner to use static_cast<...>(...), don't you think?
Thanks,
Jason Lavigne