From 25fbc557b1a66a959d09f48ed5ac954683f189bf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 8 Apr 2002 08:23:00 +0000 Subject: [PATCH] Changed a char* into const char* to fix Solaris build. --- src/osg/MemoryManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/osg/MemoryManager.cpp b/src/osg/MemoryManager.cpp index 6b75b2deb..f683f1e14 100644 --- a/src/osg/MemoryManager.cpp +++ b/src/osg/MemoryManager.cpp @@ -270,7 +270,7 @@ static void doCleanupLogOnFirstRun() static const char *sourceFileStripper(const char *sourceFile) { - char *ptr = strrchr(sourceFile, '\\'); + const char *ptr = strrchr(sourceFile, '\\'); if (ptr) return ptr + 1; ptr = strrchr(sourceFile, '/'); if (ptr) return ptr + 1; @@ -423,6 +423,9 @@ static void wipeWithPattern(sAllocUnit *allocUnit, unsigned long pattern, char *cptr = (char *) lptr; for (i = 0; i < (length & 0x3); i++, cptr++, shiftCount += 8) { + char res1 = (pattern & (0xff << shiftCount)) >> shiftCount; + char res2 = static_cast((pattern >> shiftCount) & 0xff); + assert(res1==res2); *cptr = (pattern & (0xff << shiftCount)) >> shiftCount; } }