Stack: Add Boolean to the numeric data types; Improve documentation

This commit is contained in:
Julius Pfrommer
2018-11-06 23:29:54 +01:00
committed by Julius Pfrommer
parent a469a0d9b4
commit e8d10c4479
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -816,6 +816,9 @@ struct UA_DataType {
UA_DataTypeMember *members;
};
/* Test if the data type is a numeric builtin data type. This includes Boolean,
* integers and floating point numbers. Not included are DateTime and
* StatusCode. */
UA_Boolean
UA_DataType_isNumeric(const UA_DataType *type);
+1 -1
View File
@@ -1097,7 +1097,7 @@ UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
UA_Boolean
UA_DataType_isNumeric(const UA_DataType *type) {
/* All data types between UA_TYPES_SBYTE and UA_TYPES_DOUBLE are numeric */
for(size_t i = UA_TYPES_SBYTE; i <= UA_TYPES_DOUBLE; ++i)
for(size_t i = UA_TYPES_BOOLEAN; i <= UA_TYPES_DOUBLE; ++i)
if(&UA_TYPES[i] == type)
return true;
return false;