From dd0e99ba88d1697e41c8a8207313f93d0bd7fe7b Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 1 May 2015 16:24:04 -0700 Subject: Backfill some FX String unit tests for == and !=. ... and there are a few inconsistencies which we can now fix. Also add a comment about why these strings aren't headed for the dust-bin long term. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1122573002 --- core/include/fxcrt/fx_string.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'core/include/fxcrt/fx_string.h') diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h index c98a77cfe1..b4d7249209 100644 --- a/core/include/fxcrt/fx_string.h +++ b/core/include/fxcrt/fx_string.h @@ -182,7 +182,10 @@ struct CFX_StringData { FX_STRSIZE m_nAllocLength; FX_CHAR m_String[1]; }; -class CFX_ByteString + +// A mutable string with shared buffers using copy-on-write semantics that +// avoids the cost of std::string's iterator stability guarantees. +class CFX_ByteString { public: typedef FX_CHAR value_type; @@ -595,7 +598,10 @@ struct CFX_StringDataW { FX_STRSIZE m_nAllocLength; FX_WCHAR m_String[1]; }; -class CFX_WideString + +// A mutable string with shared buffers using copy-on-write semantics that +// avoids the cost of std::string's iterator stability guarantees. +class CFX_WideString { public: typedef FX_WCHAR value_type; -- cgit v1.2.3