From d11954fc7f3fd532bc354e715dc92e3fd8d9a332 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 2 Dec 2021 15:32:18 +1000 Subject: [PATCH 1/2] build fix for E57_DEBUG undefined --- src/CompressedVectorReaderImpl.cpp | 2 ++ src/CompressedVectorWriterImpl.cpp | 2 ++ src/DecodeChannel.cpp | 2 ++ src/ImageFileImpl.cpp | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/CompressedVectorReaderImpl.cpp b/src/CompressedVectorReaderImpl.cpp index e59c5ba..60a62ab 100644 --- a/src/CompressedVectorReaderImpl.cpp +++ b/src/CompressedVectorReaderImpl.cpp @@ -574,6 +574,7 @@ namespace e57 } } +#ifdef E57_DEBUG void CompressedVectorReaderImpl::dump( int indent, std::ostream &os ) { os << space( indent ) << "isOpen:" << isOpen_ << std::endl; @@ -600,5 +601,6 @@ namespace e57 os << space( indent ) << "maxRecordCount: " << maxRecordCount_ << std::endl; os << space( indent ) << "sectionEndLogicalOffset: " << sectionEndLogicalOffset_ << std::endl; } +#endif } diff --git a/src/CompressedVectorWriterImpl.cpp b/src/CompressedVectorWriterImpl.cpp index a9a93fa..f6bc42d 100644 --- a/src/CompressedVectorWriterImpl.cpp +++ b/src/CompressedVectorWriterImpl.cpp @@ -614,6 +614,7 @@ namespace e57 } } +#ifdef E57_DEBUG void CompressedVectorWriterImpl::dump( int indent, std::ostream &os ) { os << space( indent ) << "isOpen:" << isOpen_ << std::endl; @@ -655,4 +656,5 @@ namespace e57 os << space( indent ) << "dataPacketsCount: " << dataPacketsCount_ << std::endl; os << space( indent ) << "indexPacketsCount: " << indexPacketsCount_ << std::endl; } +#endif } diff --git a/src/DecodeChannel.cpp b/src/DecodeChannel.cpp index 9230b65..043a7e6 100644 --- a/src/DecodeChannel.cpp +++ b/src/DecodeChannel.cpp @@ -66,6 +66,7 @@ namespace e57 return ( currentBytestreamBufferIndex == currentBytestreamBufferLength ); } +#ifdef E57_DEBUG void DecodeChannel::dump( int indent, std::ostream &os ) { os << space( indent ) << "dbuf" << std::endl; @@ -83,4 +84,5 @@ namespace e57 os << space( indent ) << "isInputBlocked(): " << isInputBlocked() << std::endl; os << space( indent ) << "isOutputBlocked(): " << isOutputBlocked() << std::endl; } +#endif } diff --git a/src/ImageFileImpl.cpp b/src/ImageFileImpl.cpp index 85ffd82..6a9da74 100644 --- a/src/ImageFileImpl.cpp +++ b/src/ImageFileImpl.cpp @@ -869,6 +869,7 @@ namespace e57 } } +#ifdef E57_DEBUG void ImageFileImpl::dump( int indent, std::ostream &os ) const { /// no checkImageFileOpen(__FILE__, __LINE__, __FUNCTION__) @@ -884,6 +885,7 @@ namespace e57 os << space( indent ) << "root: " << std::endl; root_->dump( indent + 2, os ); } +#endif unsigned ImageFileImpl::bitsNeeded( int64_t minimum, int64_t maximum ) { From 49309d8d444bfabfcc9bd6dc9748824da5fc3169 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Thu, 2 Dec 2021 15:38:41 +1000 Subject: [PATCH 2/2] NodeImpl build fix for E57_DEBUG undefined --- src/NodeImpl.cpp | 6 +++++- src/NodeImpl.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/NodeImpl.cpp b/src/NodeImpl.cpp index 1542d08..275d279 100644 --- a/src/NodeImpl.cpp +++ b/src/NodeImpl.cpp @@ -241,7 +241,9 @@ NodeImplSharedPtr NodeImpl::get( const ustring &pathName ) /// function. Only absolute pathNames make any sense here, because the /// terminal types can't have children, so relative pathNames are illegal. +#ifdef E57_DEBUG _verifyPathNameAbsolute( pathName ); +#endif NodeImplSharedPtr root = _verifyAndGetRoot(); @@ -256,7 +258,9 @@ void NodeImpl::set( const ustring &pathName, NodeImplSharedPtr ni, bool autoPath /// function. Only absolute pathNames make any sense here, because the /// terminal types can't have children, so relative pathNames are illegal. +#ifdef E57_DEBUG _verifyPathNameAbsolute( pathName ); +#endif NodeImplSharedPtr root = _verifyAndGetRoot(); @@ -405,6 +409,7 @@ bool NodeImpl::_verifyPathNameAbsolute( const ustring &inPathName ) return isRelative; } +#endif NodeImplSharedPtr NodeImpl::_verifyAndGetRoot() { @@ -424,4 +429,3 @@ NodeImplSharedPtr NodeImpl::_verifyAndGetRoot() return root; } -#endif diff --git a/src/NodeImpl.h b/src/NodeImpl.h index f26adbe..177b1ef 100644 --- a/src/NodeImpl.h +++ b/src/NodeImpl.h @@ -73,7 +73,9 @@ namespace e57 #endif private: +#ifdef E57_DEBUG bool _verifyPathNameAbsolute( const ustring &inPathName ); +#endif NodeImplSharedPtr _verifyAndGetRoot();