summaryrefslogtreecommitdiff
path: root/source/core/slang-string-slice-pool.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-04-20 13:42:20 -0400
committerGitHub <noreply@github.com>2023-04-20 13:42:20 -0400
commit088644c21c015eb60a41a59f417990023f1f4ef8 (patch)
tree596d224f99e35dcd3d66507cfe297bc25407336d /source/core/slang-string-slice-pool.h
parent4e67cdedbef8f643c90b48172d5419d3dd1839db (diff)
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.
Diffstat (limited to 'source/core/slang-string-slice-pool.h')
-rw-r--r--source/core/slang-string-slice-pool.h12
1 files changed, 9 insertions, 3 deletions
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<UnownedStringSlice> m_slices;