Skip to content

Commit ae4ede4

Browse files
committed
BUG: Fix issue in StringForHDFType() where H5Tequal API is used incorrectly
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
1 parent 5379781 commit ae4ede4

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

Source/H5Support/H5Lite.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -368,52 +368,52 @@ inline std::string StringForHDFType(hid_t dataTypeIdentifier)
368368
return "H5T_STRING";
369369
}
370370

371-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT8) != 0)
371+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT8) > 0)
372372
{
373373
return "H5T_NATIVE_INT8";
374374
}
375-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT8) != 0)
375+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT8) > 0)
376376
{
377377
return "H5T_NATIVE_UINT8";
378378
}
379379

380-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT16) != 0)
380+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT16) > 0)
381381
{
382382
return "H5T_NATIVE_INT16";
383383
}
384-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT16) != 0)
384+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT16) > 0)
385385
{
386386
return "H5T_NATIVE_UINT16";
387387
}
388388

389-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT32) != 0)
389+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT32) > 0)
390390
{
391391
return "H5T_NATIVE_INT32";
392392
}
393-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT32) != 0)
393+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT32) > 0)
394394
{
395395
return "H5T_NATIVE_UINT32";
396396
}
397397

398-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT64) != 0)
398+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_INT64) > 0)
399399
{
400400
return "H5T_NATIVE_INT64";
401401
}
402-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT64) != 0)
402+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_UINT64) > 0)
403403
{
404404
return "H5T_NATIVE_UINT64";
405405
}
406406

407-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_FLOAT) != 0)
407+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_FLOAT) > 0)
408408
{
409409
return "H5T_NATIVE_FLOAT";
410410
}
411-
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_DOUBLE) != 0)
411+
if(H5Tequal(dataTypeIdentifier, H5T_NATIVE_DOUBLE) > 0)
412412
{
413413
return "H5T_NATIVE_DOUBLE";
414414
}
415415

416-
std::cout << "Error: HDFTypeForPrimitiveAsStr - Unknown Type: " << dataTypeIdentifier << std::endl;
416+
std::cout << "Error: StringForHDFType - Did not find a matching numeric type: " << dataTypeIdentifier << std::endl;
417417
return "Unknown";
418418
}
419419

0 commit comments

Comments
 (0)