From 088644c21c015eb60a41a59f417990023f1f4ef8 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 20 Apr 2023 13:42:20 -0400 Subject: Improve SourceMap coverage/testing (#2818) * #include an absolute path didn't work - because paths were taken to always be relative. * WIP around more value like behavior for SourceMap/StringPool. * Use default impls on SourceMap ctor/assignment. * Handle comparison of SourceMaps. Some small fixes. Expand unit tests. --- source/core/slang-string-slice-pool.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'source/core/slang-string-slice-pool.h') diff --git a/source/core/slang-string-slice-pool.h b/source/core/slang-string-slice-pool.h index 90586a527..843556296 100644 --- a/source/core/slang-string-slice-pool.h +++ b/source/core/slang-string-slice-pool.h @@ -102,13 +102,19 @@ public: /// Swap this with rhs void swapWith(ThisType& rhs); + /// True if the pools are identical. Same style, same slices in the same order. + bool operator==(const ThisType& rhs) const; + + /// Copy ctor + StringSlicePool(const ThisType& rhs); + /// Assignment + void operator=(const ThisType& rhs); + /// Ctor explicit StringSlicePool(Style style); protected: - // Disable copy ctor and assignment - StringSlicePool(const ThisType& rhs) = delete; - void operator=(const ThisType& rhs) = delete; + void _set(const ThisType& rhs); Style m_style; List m_slices; -- cgit v1.2.3