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=6c5c3f7a1d329a9c69648835033ad2acf15d8f11;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_