mirror of
https://github.com/open62541/open62541.git
synced 2026-10-29 13:20:10 +08:00
Stack: Add Boolean to the numeric data types; Improve documentation
This commit is contained in:
committed by
Julius Pfrommer
parent
a469a0d9b4
commit
e8d10c4479
@@ -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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user