From 4f3de95eaa2a9777400fde7c30c0aa4fbff46ab1 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 26 Dec 2023 15:57:23 +0100 Subject: [PATCH] factorize the operator to get the usable type for the non-const type --- ebml/EbmlElement.h | 2 ++ ebml/EbmlString.h | 1 - ebml/EbmlUnicodeString.h | 1 - src/EbmlString.cpp | 2 -- src/EbmlUnicodeString.cpp | 2 -- 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/ebml/EbmlElement.h b/ebml/EbmlElement.h index f49fce80..0134d37c 100644 --- a/ebml/EbmlElement.h +++ b/ebml/EbmlElement.h @@ -654,6 +654,8 @@ class EBML_DLL_API EbmlElementDefaultStorage : public EbmlElementDefault { return Value; } + explicit operator const S &() const { return Value; } + protected: S Value; }; diff --git a/ebml/EbmlString.h b/ebml/EbmlString.h index b82f08ee..7514bd0b 100644 --- a/ebml/EbmlString.h +++ b/ebml/EbmlString.h @@ -29,7 +29,6 @@ class EBML_DLL_API EbmlString : public EbmlElementDefaultStorage