Open GoogleCodeExporter opened 8 years ago
I believe the recent change from simply using assert to using COLLADABU_ASSERT
wasn;t reflected in one particular file. I have attached the patch here.
Index: COLLADAFramework/include/COLLADAFWArray.h
===================================================================
--- COLLADAFramework/include/COLLADAFWArray.h (revision 833)
+++ COLLADAFramework/include/COLLADAFWArray.h (working copy)
@@ -12,6 +12,7 @@
#define __COLLADAFW_ARRAY_H__
#include "COLLADAFWPrerequisites.h"
+#include "COLLADABUPlatform.h"
#include <cassert>
Original comment by freaka...@gmail.com
on 12 Feb 2011 at 10:10
I have similar issue in revision 839.
here is the error
In file included from
/home/alexey/workspace/opencollada/common/libBuffer/src/CommonCharacterBuffer.cp
p:11:0:
/home/alexey/workspace/opencollada/common/libBuffer/include/CommonCharacterBuffe
r.h: In member function ‘bool
Common::CharacterBuffer::copyToBufferAsChar(IntegerType)’:
/home/alexey/workspace/opencollada/common/libBuffer/include/CommonCharacterBuffe
r.h:97:55: error: there are no arguments to ‘COLLADABU_ASSERT’ that depend
on a template parameter, so a declaration of ‘COLLADABU_ASSERT’ must be
available
/home/alexey/workspace/opencollada/common/libBuffer/include/CommonCharacterBuffe
r.h:97:55: note: (if you use ‘-fpermissive’, G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
make[2]: ***
[common/libBuffer/CMakeFiles/buffer_shared.dir/src/CommonCharacterBuffer.cpp.o]
Error 1
make[1]: *** [common/libBuffer/CMakeFiles/buffer_shared.dir/all] Error 2
make: *** [all] Error 2
Original comment by Alexey.Z...@gmail.com
on 17 May 2011 at 10:08
the problem is in the libBuffer in CommonCharacterBuffer.h
Here is the problem part:
bool CharacterBuffer::copyToBufferAsChar( IntegerType i)
{
size_t maxIntLength = Itoa<IntegerType>::MINIMUM_BUFFERSIZE_10;
if ( getBytesAvailable() < maxIntLength )
{
//The int might not fit into the buffer. We need to flush first.
flushBuffer();
}
// Check if the buffer size is large enough
COLLADABU_ASSERT(getBytesAvailable() >= maxIntLength);
if ( getBytesAvailable() < maxIntLength )
{
//No chance to convert the double with this buffer
return false;
}
increaseCurrentPosition( itoa( i, getCurrentPosition(), 10) );
return true;
}
Correct me if I am wrong, COLLADABU_ASSERT shouldn't be in libBuffer. Since
libBuffer is independent from ColladaBaseUtils.
My solution is to comment this line out.
Original comment by Alexey.Z...@gmail.com
on 17 May 2011 at 11:57
Original issue reported on code.google.com by
hva.fran...@gmail.com
on 3 Feb 2011 at 8:58