From 6c5c3f7a1d329a9c69648835033ad2acf15d8f11 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