From: Viktor UZLOV Date: Mon, 1 Feb 2021 11:43:27 +0000 (+0300) Subject: add cast functions from/to idtype X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d7a234393171abd0fed3810ebacd0e80aa187f8;p=modules%2Fkernel.git add cast functions from/to idtype --- diff --git a/src/Basics/smIdType.hxx.in b/src/Basics/smIdType.hxx.in index b97de4a1f..75315a5da 100644 --- a/src/Basics/smIdType.hxx.in +++ b/src/Basics/smIdType.hxx.in @@ -33,4 +33,13 @@ typedef std::int32_t smIdType; typedef std::int64_t smIdType; #endif +template inline smIdType ToIdType(T val) +{ + return static_cast(val); +} +template inline T FromIdType(smIdType val) +{ + return static_cast(val); +} + #endif //_SMIDTYPE_HXX_