Skip to content

Commit

Permalink
STYLE: Move TS_EVAL_CHECK(statement) macro definition up
Browse files Browse the repository at this point in the history
Allowed the macro to be called anywhere in the source file.
  • Loading branch information
N-Dekker committed Aug 22, 2024
1 parent c6f4c44 commit bd43bfe
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/itkOMEZarrNGFFImageIO.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@

#include <nlohmann/json.hpp>

// Evaluate tensorstore future (statement) and error-check the result.
#define TS_EVAL_CHECK(statement) \
{ \
auto result = statement.result(); \
if (!result.ok()) /* error */ \
{ \
itkExceptionMacro("tensorstore error: " << result.status()); \
} \
} \
ITK_NOOP_STATEMENT


namespace itk
{
namespace
Expand Down Expand Up @@ -387,18 +399,6 @@ OMEZarrNGFFImageIO::CanReadFile(const char * filename)
// return this->HasSupportedWriteExtension(filename, true);
}

// Evaluate tensorstore future (statement) and error-check the result.
#define TS_EVAL_CHECK(statement) \
{ \
auto result = statement.result(); \
if (!result.ok()) /* error */ \
{ \
itkExceptionMacro("tensorstore error: " << result.status()); \
} \
} \
ITK_NOOP_STATEMENT


thread_local tensorstore::TensorStore<> store; // initialized by ReadImageInformation/ReadArrayMetadata

void
Expand Down

0 comments on commit bd43bfe

Please sign in to comment.