From 1118ec32059888814430fdcd4abb560433d616f0 Mon Sep 17 00:00:00 2001 From: Isuru Samarathunga Date: Sat, 8 Nov 2025 23:46:27 +0530 Subject: [PATCH] Fixes --- .../inl/IACore/StreamReader/StreamReader.inl | 2 +- .../memory/ptr/interface/refptr.interface.inl | 25 ++++++++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/Src/IACore/imp/inl/IACore/StreamReader/StreamReader.inl b/Src/IACore/imp/inl/IACore/StreamReader/StreamReader.inl index 0f31f2e..eb928b2 100644 --- a/Src/IACore/imp/inl/IACore/StreamReader/StreamReader.inl +++ b/Src/IACore/imp/inl/IACore/StreamReader/StreamReader.inl @@ -16,7 +16,7 @@ #pragma once -#include "interface/StreamReader.interface.inl" +#include "Interface/StreamReader.interface.inl" namespace ia { diff --git a/Src/IACore/imp/inl/IACore/memory/ptr/interface/refptr.interface.inl b/Src/IACore/imp/inl/IACore/memory/ptr/interface/refptr.interface.inl index 1b549bd..400cef3 100644 --- a/Src/IACore/imp/inl/IACore/memory/ptr/interface/refptr.interface.inl +++ b/Src/IACore/imp/inl/IACore/memory/ptr/interface/refptr.interface.inl @@ -1,16 +1,16 @@ -// IACore-OSS; The Core Library for All IA Open Source Projects +// IACore-OSS; The Core Library for All IA Open Source Projects // Copyright (C) 2024 IAS (ias@iasoft.dev) -// +// // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. -// +// // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -// +// // You should have received a copy of the GNU General Public License // along with this program. If not, see . @@ -19,11 +19,18 @@ #include #include +#define REF_PTR_CLASS \ + template friend INLINE RefPtr<_value_type> MakeRefPtr(Args &&...args) \ + { \ + return std::make_shared<_value_type>(std::forward(args)...); \ + } + namespace ia { - template - using RefPtr = std::shared_ptr<_value_type>; + template using RefPtr = std::shared_ptr<_value_type>; - template - INLINE RefPtr<_value_type> MakeRefPtr(Args... args) { return std::make_shared<_value_type>(args...); } -} + template INLINE RefPtr<_value_type> MakeRefPtr(Args &&...args) + { + return std::make_shared<_value_type>(std::forward(args)...); + } +} // namespace ia