]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
add cast functions from/to idtype
authorViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Mon, 1 Feb 2021 11:43:27 +0000 (14:43 +0300)
committerViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Tue, 16 Feb 2021 11:36:50 +0000 (14:36 +0300)
src/Basics/smIdType.hxx.in

index b97de4a1f73e263fc6a63a76479a38d9b1883c41..75315a5da8e9cf19b453a0454e1dca00bd4b6290 100644 (file)
@@ -33,4 +33,13 @@ typedef std::int32_t smIdType;
 typedef std::int64_t smIdType;
 #endif
 
+template <class T> inline smIdType ToIdType(T val)
+{
+  return static_cast<smIdType>(val);
+}
+template <class T> inline T FromIdType(smIdType val)
+{
+  return static_cast<T>(val);
+}
+
 #endif //_SMIDTYPE_HXX_