Bug 517078. Move 'using namespace' out of header files, per comment from roc.
authorJonathan Griffin <jgriffin@mozilla.com>
Wed, 07 Oct 2009 16:48:31 -0700
changeset 33639 faf30cf5f6dc6a790a11392c59e55d9dd64fc1b9
parent 33638 6f28cbd325c5af5c1cc8815de6c0a5fff1cacfab
child 33640 4f66b143dc543f922f6d0a0ae827fc5be256f3ef
push idunknown
push userunknown
push dateunknown
bugs517078
milestone1.9.3a1pre
Bug 517078. Move 'using namespace' out of header files, per comment from roc.
modules/plugin/test/testplugin/nptest.cpp
modules/plugin/test/testplugin/nptest.h
modules/plugin/test/testplugin/nptest_gtk2.cpp
modules/plugin/test/testplugin/nptest_macosx.mm
modules/plugin/test/testplugin/nptest_os2.cpp
modules/plugin/test/testplugin/nptest_platform.h
modules/plugin/test/testplugin/nptest_qt.cpp
modules/plugin/test/testplugin/nptest_windows.cpp
--- a/modules/plugin/test/testplugin/nptest.cpp
+++ b/modules/plugin/test/testplugin/nptest.cpp
@@ -38,16 +38,18 @@
 
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <iostream>
 #include <string>
 #include <sstream>
 
+ using namespace std;
+
 #define PLUGIN_NAME        "Test Plug-in"
 #define PLUGIN_DESCRIPTION "Plug-in for testing purposes."
 #define PLUGIN_VERSION     "1.0.0.0"
 
 #define ARRAY_LENGTH(a) (sizeof(a)/sizeof(a[0]))
 
 //
 // static data
--- a/modules/plugin/test/testplugin/nptest.h
+++ b/modules/plugin/test/testplugin/nptest.h
@@ -38,18 +38,16 @@
 
 #include "npapi.h"
 #include "npfunctions.h"
 #include "npruntime.h"
 #include "prtypes.h"
 #include <string>
 #include <sstream>
 
-using namespace std;
-
 typedef enum  {
   DM_DEFAULT,
   DM_SOLID_COLOR
 } DrawMode;
 
 typedef enum {
   FUNCTION_NONE,
   FUNCTION_NPP_GETURL,
@@ -98,19 +96,19 @@ typedef struct InstanceData {
   int32_t lastMouseX;
   int32_t lastMouseY;
   int32_t writeCount;
   int32_t writeReadyCount;
   TestFunction testFunction;
   TestFunction functionToFail;
   NPError failureCode;
   PostMode postMode;
-  string testUrl;
-  string frame;
-  ostringstream err;
+  std::string testUrl;
+  std::string frame;
+  std::ostringstream err;
   uint16_t streamMode;
   int32_t streamChunkSize;
   int32_t streamBufSize;
   int32_t fileBufSize;
   TestRange* testrange;
   void* streamBuf;
   void* fileBuf;
 } InstanceData;
--- a/modules/plugin/test/testplugin/nptest_gtk2.cpp
+++ b/modules/plugin/test/testplugin/nptest_gtk2.cpp
@@ -37,16 +37,18 @@
 #include "npapi.h"
 #include <gdk/gdk.h>
 #ifdef MOZ_X11
 #include <gdk/gdkx.h>
 #include <X11/extensions/shape.h>
 #endif
 #include <gtk/gtk.h>
 
+ using namespace std;
+
 struct _PlatformData {
   Display* display;
   GtkWidget* plug;
 };
 
 bool
 pluginSupportsWindowMode()
 {
--- a/modules/plugin/test/testplugin/nptest_macosx.mm
+++ b/modules/plugin/test/testplugin/nptest_macosx.mm
@@ -29,16 +29,18 @@
  * Contributor(s):
  *   Josh Aas <josh@mozilla.com>
  * 
  * ***** END LICENSE BLOCK ***** */
 
 #include "nptest_platform.h"
 #include <CoreServices/CoreServices.h>
 
+ using namespace std;
+
 #ifdef __LP64__
 // 64-bit requires the Cocoa event model
 #define USE_COCOA_NPAPI 1
 #endif
 
 bool
 pluginSupportsWindowMode()
 {
--- a/modules/plugin/test/testplugin/nptest_os2.cpp
+++ b/modules/plugin/test/testplugin/nptest_os2.cpp
@@ -28,16 +28,18 @@
  * 
  * Contributor(s):
  *   Josh Aas <josh@mozilla.com>
  * 
  * ***** END LICENSE BLOCK ***** */
 
 #include "nptest_platform.h"
 
+ using namespace std;
+
 bool
 pluginSupportsWindowMode()
 {
   return false;
 }
 
 bool
 pluginSupportsWindowlessMode()
--- a/modules/plugin/test/testplugin/nptest_platform.h
+++ b/modules/plugin/test/testplugin/nptest_platform.h
@@ -113,11 +113,11 @@ int32_t pluginGetClipRegionRectCount(Ins
 int32_t pluginGetClipRegionRectEdge(InstanceData* instanceData, 
     int32_t rectIndex, RectEdge edge);
 
 /**
  * Check that the platform-specific plugin state is internally consistent.
  * Just return if everything is OK, otherwise append error messages
  * to 'error' separated by \n.
  */
-void pluginDoInternalConsistencyCheck(InstanceData* instanceData, string& error);
+void pluginDoInternalConsistencyCheck(InstanceData* instanceData, std::string& error);
 
 #endif // nptest_platform_h_
--- a/modules/plugin/test/testplugin/nptest_qt.cpp
+++ b/modules/plugin/test/testplugin/nptest_qt.cpp
@@ -28,16 +28,18 @@
  * 
  * Contributor(s):
  *   Josh Aas <josh@mozilla.com>
  * 
  * ***** END LICENSE BLOCK ***** */
 
 #include "nptest_platform.h"
 
+ using namespace std;
+
 bool
 pluginSupportsWindowMode()
 {
   return false;
 }
 
 bool
 pluginSupportsWindowlessMode()
--- a/modules/plugin/test/testplugin/nptest_windows.cpp
+++ b/modules/plugin/test/testplugin/nptest_windows.cpp
@@ -32,16 +32,18 @@
  * 
  * ***** END LICENSE BLOCK ***** */
 
 #include "nptest_platform.h"
 
 #include <windows.h>
 #include <windowsx.h>
 
+ using namespace std;
+
 #pragma comment(lib, "msimg32.lib")
 
 void SetSubclass(HWND hWnd, InstanceData* instanceData);
 void ClearSubclass(HWND hWnd);
 LRESULT CALLBACK PluginWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
 
 struct _PlatformData {
   HWND childWindow;