From d6c7ef2346d60ad934231d6b4bf6d342b278a0d4 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 21 Jul 2009 09:05:43 +0000 Subject: Using a much simpler property set implementation. Accessor objects use the PropertyGet interface to access just the property set methods they need. Removed SString. --- src/ScintillaBase.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/ScintillaBase.cxx') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 5e2d9114b..3aba5fb7b 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -16,6 +16,7 @@ #include "Scintilla.h" #include "PropSet.h" +#include "PropSetSimple.h" #ifdef SCI_LEXER #include "SciLexer.h" #include "Accessor.h" @@ -706,24 +707,23 @@ sptr_t ScintillaBase::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lPara break; case SCI_GETPROPERTY: { - SString val = props.Get(reinterpret_cast(wParam)); - const int n = val.length(); + const char *val = props.Get(reinterpret_cast(wParam)); + const int n = strlen(val); if (lParam != 0) { char *ptr = reinterpret_cast(lParam); - memcpy(ptr, val.c_str(), n); - ptr[n] = '\0'; // terminate + strcpy(ptr, val); } return n; // Not including NUL } case SCI_GETPROPERTYEXPANDED: { - SString val = props.GetExpanded(reinterpret_cast(wParam)); - const int n = val.length(); + char *val = props.Expanded(reinterpret_cast(wParam)); + const int n = strlen(val); if (lParam != 0) { char *ptr = reinterpret_cast(lParam); - memcpy(ptr, val.c_str(), n); - ptr[n] = '\0'; // terminate + strcpy(ptr, val); } + delete []val; return n; // Not including NUL } -- cgit v1.2.3