From 8f405e4784cb805120732625e8f98bcbba01ef93 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 3 May 2024 09:16:37 -0400 Subject: [PATCH] cwFlowTypes.h : Fixed bug in kNumericTFl enumeration. Added kAllTFl --- cwFlowTypes.cpp | 3 ++- cwFlowTypes.h | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cwFlowTypes.cpp b/cwFlowTypes.cpp index df43567..63f9fbb 100644 --- a/cwFlowTypes.cpp +++ b/cwFlowTypes.cpp @@ -46,7 +46,8 @@ namespace cw { kFloatTFl, "coeff"}, { kDoubleTFl, "ftime" }, - { kBoolTFl | kUIntTFl | kIntTFl | kFloatTFl | kDoubleTFl, "numeric" }, + { kNumericTFl, "numeric" }, + { kAllTFl, "all" }, { kRuntimeTFl, "runtime" }, diff --git a/cwFlowTypes.h b/cwFlowTypes.h index b0c4cf9..d207e0d 100644 --- a/cwFlowTypes.h +++ b/cwFlowTypes.h @@ -82,7 +82,9 @@ namespace cw kRuntimeTFl = 0x80000000, - kNumericFlags = kBoolMtxTFl | kUIntMtxTFl | kIntMtxTFl | kFloatMtxTFl | kDoubleMtxTFl + kNumericTFl = kBoolTFl | kUIntTFl | kIntTFl | kFloatTFl | kDoubleTFl, + kMtxTFl = kBoolMtxTFl | kUIntMtxTFl | kIntMtxTFl | kFloatMtxTFl | kDoubleMtxTFl, + kAllTFl = kTypeMask }; typedef struct mtx_str @@ -285,8 +287,8 @@ namespace cw // inline void set_null( value_t& v, unsigned tflag ) { v.tflag=tflag; v.u.p=nullptr; } - inline bool is_numeric( const value_t* v ) { return cwIsFlag(v->tflag,kBoolTFl|kUIntTFl|kIntTFl|kFloatTFl|kDoubleTFl); } - inline bool is_matrix( const value_t* v ) { return cwIsFlag(v->tflag,kNumericFlags); } + inline bool is_numeric( const value_t* v ) { return cwIsFlag(v->tflag,kNumericTFl); } + inline bool is_matrix( const value_t* v ) { return cwIsFlag(v->tflag,kMtxTFl); } // if all of the src flags are set in the dst flags then the two types are convertable. inline bool can_convert( unsigned src_tflag, unsigned dst_tflag ) { return (src_tflag&dst_tflag)==src_tflag; }