@@ -151,11 +151,11 @@ class OPENVDB_API TreeBase
151151 // / @brief Read the tree topology from a stream.
152152 // /
153153 // / This will read the tree structure and tile values, but not voxel data.
154- virtual void readTopology (std::istream&, bool saveFloatAsHalf = false );
154+ virtual void readTopology (std::istream&, bool saveFloatAsHalf = false ) = 0 ;
155155 // / @brief Write the tree topology to a stream.
156156 // /
157157 // / This will write the tree structure and tile values, but not voxel data.
158- virtual void writeTopology (std::ostream&, bool saveFloatAsHalf = false ) const ;
158+ virtual void writeTopology (std::ostream&, bool saveFloatAsHalf = false ) const = 0 ;
159159
160160 // / Read all data buffers for this tree.
161161 virtual void readBuffers (std::istream&, bool saveFloatAsHalf = false ) = 0;
@@ -1130,23 +1130,6 @@ struct Tree5 {
11301130// //////////////////////////////////////
11311131
11321132
1133- inline void
1134- TreeBase::readTopology (std::istream& is, bool /* saveFloatAsHalf*/ )
1135- {
1136- int32_t bufferCount;
1137- is.read (reinterpret_cast <char *>(&bufferCount), sizeof (int32_t ));
1138- if (bufferCount != 1 ) OPENVDB_LOG_WARN (" multi-buffer trees are no longer supported" );
1139- }
1140-
1141-
1142- inline void
1143- TreeBase::writeTopology (std::ostream& os, bool /* saveFloatAsHalf*/ ) const
1144- {
1145- int32_t bufferCount = 1 ;
1146- os.write (reinterpret_cast <char *>(&bufferCount), sizeof (int32_t ));
1147- }
1148-
1149-
11501133inline void
11511134TreeBase::print (std::ostream& os, int /* verboseLevel*/ ) const
11521135{
@@ -1273,7 +1256,9 @@ void
12731256Tree<RootNodeType>::readTopology(std::istream& is, bool saveFloatAsHalf)
12741257{
12751258 this ->clearAllAccessors ();
1276- TreeBase::readTopology (is, saveFloatAsHalf);
1259+ int32_t bufferCount;
1260+ is.read (reinterpret_cast <char *>(&bufferCount), sizeof (int32_t ));
1261+ if (bufferCount != 1 ) OPENVDB_LOG_WARN (" multi-buffer trees are no longer supported" );
12771262 mRoot .readTopology (is, saveFloatAsHalf);
12781263}
12791264
@@ -1282,7 +1267,8 @@ template<typename RootNodeType>
12821267void
12831268Tree<RootNodeType>::writeTopology(std::ostream& os, bool saveFloatAsHalf) const
12841269{
1285- TreeBase::writeTopology (os, saveFloatAsHalf);
1270+ int32_t bufferCount = 1 ;
1271+ os.write (reinterpret_cast <char *>(&bufferCount), sizeof (int32_t ));
12861272 mRoot .writeTopology (os, saveFloatAsHalf);
12871273}
12881274
0 commit comments