From 7d7a234393171abd0fed3810ebacd0e80aa187f8 Mon Sep 17 00:00:00 2001 From: Viktor UZLOV Date: Mon, 1 Feb 2021 14:43:27 +0300 Subject: [PATCH] add cast functions from/to idtype --- src/Basics/smIdType.hxx.in | 9 +++++++++ 1 file changed, 9 insertions(+) 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_ -- 2.39.2