[haiku-commits] r36313 - haiku/trunk/src/kits/interface/textview_support

  • From: mmlr@xxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 15 Apr 2010 20:51:50 +0200 (CEST)

Author: mmlr
Date: 2010-04-15 20:51:49 +0200 (Thu, 15 Apr 2010)
New Revision: 36313
Changeset: http://dev.haiku-os.org/changeset/36313/haiku

Modified:
   haiku/trunk/src/kits/interface/textview_support/TextGapBuffer.cpp
Log:
Make the result a proper const char *.


Modified: haiku/trunk/src/kits/interface/textview_support/TextGapBuffer.cpp
===================================================================
--- haiku/trunk/src/kits/interface/textview_support/TextGapBuffer.cpp   
2010-04-15 18:25:51 UTC (rev 36312)
+++ haiku/trunk/src/kits/interface/textview_support/TextGapBuffer.cpp   
2010-04-15 18:51:49 UTC (rev 36313)
@@ -175,7 +175,7 @@
 const char *
 TextGapBuffer::GetString(int32 fromOffset, int32 *_numBytes)
 {
-       char *result = (char *)"";
+       const char *result = "";
        if (_numBytes == NULL)
                return result;
 
@@ -216,7 +216,7 @@
                }
                result = fScratchBuffer;
 
-               char *scratchPtr = result;
+               char *scratchPtr = fScratchBuffer;
                for (uint32 i = 0; i < numChars; i++) {
                        memcpy(scratchPtr, B_UTF8_BULLET, charLen);
                        scratchPtr += charLen;


Other related posts:

  • » [haiku-commits] r36313 - haiku/trunk/src/kits/interface/textview_support - mmlr