summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5DataType.cpp5
-rw-r--r--c++/src/H5IdComponent.cpp5
2 files changed, 2 insertions, 8 deletions
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp
index b00a526..af58a90 100644
--- a/c++/src/H5DataType.cpp
+++ b/c++/src/H5DataType.cpp
@@ -338,10 +338,7 @@ DataType::encode()
bool
DataType::hasBinaryDesc() const
{
- if (encoded_buf != NULL)
- return true;
- else
- return false;
+ return encoded_buf != NULL;
}
//--------------------------------------------------------------------------
diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp
index d546d32..e1fc687 100644
--- a/c++/src/H5IdComponent.cpp
+++ b/c++/src/H5IdComponent.cpp
@@ -432,10 +432,7 @@ IdComponent::p_valid_id(const hid_t obj_id)
return false;
H5I_type_t id_type = H5Iget_type(obj_id);
- if (id_type <= H5I_BADID || id_type >= H5I_NTYPES)
- return false;
- else
- return true;
+ return (id_type > H5I_BADID && id_type < H5I_NTYPES);
}
// Notes about IdComponent::id