From 86af455e71ba0cc42e48ca712c3617da3f11c69d Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 4 Sep 2013 11:32:27 +1000 Subject: Fix namespace compilation errors when SCI_NAMESPACE defined. --- win32/PlatWin.cxx | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'win32') diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 0b57037af..0c690fd7c 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -103,14 +103,14 @@ static BOOL (WINAPI *GetMonitorInfoFn)(HMONITOR, LPMONITORINFO) = 0; static HCURSOR reverseArrowCursor = NULL; +#ifdef SCI_NAMESPACE +namespace Scintilla { +#endif + bool IsNT() { return onNT; } -#ifdef SCI_NAMESPACE -using namespace Scintilla; -#endif - Point Point::FromLong(long lpoint) { return Point(static_cast(LOWORD(lpoint)), static_cast(HIWORD(lpoint))); } @@ -498,10 +498,6 @@ public: }; typedef VarBuffer TextPositions; -#ifdef SCI_NAMESPACE -namespace Scintilla { -#endif - class SurfaceGDI : public Surface { bool unicodeMode; HDC hdc; @@ -574,10 +570,6 @@ public: void SetDBCSMode(int codePage_); }; -#ifdef SCI_NAMESPACE -} //namespace Scintilla -#endif - SurfaceGDI::SurfaceGDI() : unicodeMode(false), hdc(0), hdcOwned(false), @@ -1147,10 +1139,6 @@ void SurfaceGDI::SetDBCSMode(int codePage_) { #if defined(USE_D2D) -#ifdef SCI_NAMESPACE -namespace Scintilla { -#endif - class SurfaceD2D : public Surface { bool unicodeMode; int x, y; @@ -1230,10 +1218,6 @@ public: void SetDBCSMode(int codePage_); }; -#ifdef SCI_NAMESPACE -} //namespace Scintilla -#endif - SurfaceD2D::SurfaceD2D() : unicodeMode(false), x(0), y(0) { @@ -3262,3 +3246,7 @@ void Platform_Finalise() { ListBoxX_Unregister(); ::DeleteCriticalSection(&crPlatformLock); } + +#ifdef SCI_NAMESPACE +} +#endif -- cgit v1.2.3