From cb82a3c85639e1579009b60441ba6338544c1859 Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Fri, 10 Aug 2012 19:38:33 +0800 Subject: [PATCH] Removed magic numbers --- src/xmlctrl.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/xmlctrl.cpp b/src/xmlctrl.cpp index 426c088..48440d4 100755 --- a/src/xmlctrl.cpp +++ b/src/xmlctrl.cpp @@ -95,7 +95,7 @@ XmlCtrl::XmlCtrl ( bufferLen = strlen ( DEFAULT_XML_DECLARATION_UTF8 ); } - SendMsg ( 2001, bufferLen, ( long ) ( const char * ) buffer ); + AddTextRaw ( buffer, bufferLen ); SetSelection ( 0, 0 ); @@ -2057,13 +2057,7 @@ bool XmlCtrl::backgroundValidate ( std::string XmlCtrl::myGetTextRaw() { - int len = GetTextLength(); - char *buf = new char[len+1]; - SendMsg ( 2182, len+1, ( long ) buf ); - buf[len] = '\0'; - std::string ret ( buf ); - delete[] buf; - return ret; + return ( const char * ) GetTextRaw(); } void XmlCtrl::setErrorIndicator ( int line, int column )