udvlpr / alembic

Automatically exported from code.google.com/p/alembic
Other
0 stars 0 forks source link

Compilation errors on OS X Mavericks / Clang 5.0 #331

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
After working around issue 322, I had a build problem at several locations. The 
problem is basically that checking for NULL in a shared_ptr is supposed to be 
done by treating it as a boolean instead of `[shared_ptr] == NULL`

The error messages are all similar to the one in the attachment.

Specifically, the problematic location in the code (Alembic 1.5.2):

    - AbcCoreHDF5/CprData.cpp, line 208
    - Abc/ITypedScalarProperty.h, line 175
      (It work by doing ABCA_ASSERT( ! (! parent), ..., which is not beautiful, but I'm just trying to get things to work.)
    - Abc/ITypedArrayProperty.h, line 181
    - Abc/IObject.cpp, line 552: m_instanceObject != 0 ~> ! m_instanceObject
    - AbcGeom/IGeomParam.h, line 238
    - AbcCoreOgawa/Tests/ArchiveTests.cpp, line 95
    - AbcCoreOgawa/Tests/ArrayPropertyTests.cpp, l 1332
    - AbcCoreOgawa/Tests/ArrayPropertyTests.cpp, l 1235
    - AbcCoreHDF5/Tests/ArchiveTests.cpp, line 111
    - AbcCoreHDF5/Tests/ArrayPropertyTests.cpp, l 1321, 1224
    - AbcGeom/Tests/PlayGround.cpp, l 201

All were fixed by replacing things like `if (ptr != NULL)` by `if (ptr)`.

Original issue reported on code.google.com by marcel.r...@googlemail.com on 16 Dec 2013 at 4:49

Attachments:

GoogleCodeExporter commented 8 years ago
This can be closed, as it is fixed by adding -std=c++11 in CMakeLists (see 322).

Original comment by marcel.r...@googlemail.com on 19 Dec 2013 at 11:35

GoogleCodeExporter commented 8 years ago

Original comment by miller.lucas on 19 Dec 2013 at 6:00