From 3913091a021a8f4525f0050dfb83d1c2b8fc6f6b Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 8 Jun 2023 17:26:33 -0400 Subject: Improvements around StringBlob (#2921) * #include an absolute path didn't work - because paths were taken to always be relative. * Small fixes and improvements around reflection tool. * Make PrettyWriter printing a class. * Improvements around handling StringBlob and storing stdlib source in ISlangBlob. * Fix some issues with comments around StringBlob. * Default initialize StringBlob fields. --- source/core/slang-string.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/core/slang-string.h') diff --git a/source/core/slang-string.h b/source/core/slang-string.h index 429a60c46..b4583d0b2 100644 --- a/source/core/slang-string.h +++ b/source/core/slang-string.h @@ -474,8 +474,12 @@ namespace Slang /// Append data written to buffer output via 'prepareForAppend' directly written 'inplace' void appendInPlace(const char* chars, Index count); + /// Get the internal string represenation SLANG_FORCE_INLINE StringRepresentation* getStringRepresentation() const { return m_buffer; } + /// Detach the representation (will leave string as empty). Rep ref count will remain unchanged. + SLANG_FORCE_INLINE StringRepresentation* detachStringRepresentation() { return m_buffer.detach(); } + const char* begin() const { return getData(); -- cgit v1.2.3