Revision: 5755
http://winmerge.svn.sourceforge.net/winmerge/?rev=5755&view=rev
Author: marcelgosselin
Date: 2008-08-08 02:24:18 +0000 (Fri, 08 Aug 2008)
Log Message:
-----------
Change all "using namespace std" directives to "using std::vector" or "using std::map" declarations to prevent polluting the global namespace.
Modified Paths:
--------------
trunk/Src/FileFilterMgr.cpp
trunk/Src/GhostTextBuffer.cpp
trunk/Src/LineFiltersList.cpp
trunk/Src/LocationView.cpp
trunk/Src/MergeDiffDetailView.cpp
trunk/Src/MergeDocDiffSync.cpp
trunk/Src/MergeDocLineDiffs.cpp
trunk/Src/MergeEditView.cpp
trunk/Src/MovedLines.cpp
trunk/Src/Plugins.cpp
trunk/Src/SyntaxColors.cpp
trunk/Src/editlib/ccrystaltextbuffer.cpp
trunk/Src/stringdiffs.cpp
Modified: trunk/Src/FileFilterMgr.cpp
===================================================================
--- trunk/Src/FileFilterMgr.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/FileFilterMgr.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -23,7 +23,7 @@
// ID line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <string.h>
#include <vector>
#include "UnicodeString.h"
@@ -39,7 +39,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
/**
* @brief Deletes items from filter list.
Modified: trunk/Src/GhostTextBuffer.cpp
===================================================================
--- trunk/Src/GhostTextBuffer.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/GhostTextBuffer.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -31,7 +31,7 @@
// ID line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
#include "GhostTextBuffer.h"
@@ -45,7 +45,7 @@
#define _ADVANCED_BUGCHECK 1
#endif
-using namespace std;
+using std::vector;
BEGIN_MESSAGE_MAP (CGhostTextBuffer, CCrystalTextBuffer)
//{{AFX_MSG_MAP(CGhostTextBuffer)
Modified: trunk/Src/LineFiltersList.cpp
===================================================================
--- trunk/Src/LineFiltersList.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/LineFiltersList.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -18,7 +18,7 @@
#include "OptionsDef.h"
#include "OptionsMgr.h"
-using namespace std;
+using std::vector;
/** @brief Registry key for saving linefilters. */
static const TCHAR FiltersRegPath[] =_T("LineFilters");
Modified: trunk/Src/LocationView.cpp
===================================================================
--- trunk/Src/LocationView.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/LocationView.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -29,9 +29,9 @@
// ID line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
-#include "merge.h"
+#include "Merge.h"
#include "OptionsMgr.h"
#include "MergeEditView.h"
#include "LocationView.h"
@@ -48,7 +48,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
/** @brief Size of empty frame above and below bars (in pixels). */
static const int Y_OFFSET = 5;
Modified: trunk/Src/MergeDiffDetailView.cpp
===================================================================
--- trunk/Src/MergeDiffDetailView.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/MergeDiffDetailView.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -10,9 +10,9 @@
//
//////////////////////////////////////////////////////////////////////
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
-#include "merge.h"
+#include "Merge.h"
#include "MergeDiffDetailView.h"
#include "MergeDoc.h"
#include "MainFrm.h"
@@ -30,7 +30,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
static const UINT NROWS_INIT = 4;
Modified: trunk/Src/MergeDocDiffSync.cpp
===================================================================
--- trunk/Src/MergeDocDiffSync.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/MergeDocDiffSync.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -7,7 +7,7 @@
// RCS ID line follows -- this is updated by CVS
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
#include "MergeDoc.h"
@@ -21,7 +21,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
/**
* @brief Divide diff blocks to match lines in diff blocks.
Modified: trunk/Src/MergeDocLineDiffs.cpp
===================================================================
--- trunk/Src/MergeDocLineDiffs.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/MergeDocLineDiffs.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -7,7 +7,7 @@
// RCS ID line follows -- this is updated by CVS
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
#include "Merge.h"
#include "MainFrm.h"
@@ -22,7 +22,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
/**
* @brief Display the line/word difference highlight in edit view
Modified: trunk/Src/MergeEditView.cpp
===================================================================
--- trunk/Src/MergeEditView.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/MergeEditView.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -26,10 +26,10 @@
// ID line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
#include "BCMenu.h"
-#include "merge.h"
+#include "Merge.h"
#include "LocationView.h"
#include "MergeEditView.h"
#include "MergeDiffDetailView.h"
@@ -53,7 +53,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
/** @brief Timer ID for delayed rescan. */
const UINT IDT_RESCAN = 2;
Modified: trunk/Src/MovedLines.cpp
===================================================================
--- trunk/Src/MovedLines.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/MovedLines.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -11,7 +11,7 @@
#include <map>
#include "MovedLines.h"
-using namespace std;
+using std::map;
/**
* @brief clear the lists of moved blocks.
Modified: trunk/Src/Plugins.cpp
===================================================================
--- trunk/Src/Plugins.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/Plugins.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -50,7 +50,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
static CStringArray theScriptletList;
/// Need to lock the *.sct so the user can't delete them
Modified: trunk/Src/SyntaxColors.cpp
===================================================================
--- trunk/Src/SyntaxColors.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/SyntaxColors.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -6,14 +6,14 @@
// ID line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
#include "UnicodeString.h"
#include "SyntaxColors.h"
#include "OptionsDef.h"
#include "OptionsMgr.h"
-using namespace std;
+using std::vector;
/** @brief Setting name for default colors. */
static const TCHAR DefColorsPath[] =_T("DefaultSyntaxColors");
Modified: trunk/Src/editlib/ccrystaltextbuffer.cpp
===================================================================
--- trunk/Src/editlib/ccrystaltextbuffer.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/editlib/ccrystaltextbuffer.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -62,7 +62,7 @@
// line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
#include <malloc.h>
#include "editcmd.h"
@@ -85,7 +85,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
const TCHAR crlf[] = _T ("\r\n");
Modified: trunk/Src/stringdiffs.cpp
===================================================================
--- trunk/Src/stringdiffs.cpp 2008-08-08 02:11:51 UTC (rev 5754)
+++ trunk/Src/stringdiffs.cpp 2008-08-08 02:24:18 UTC (rev 5755)
@@ -7,7 +7,7 @@
// ID line follows -- this is updated by SVN
// $Id$
-#include "stdafx.h"
+#include "StdAfx.h"
#include <vector>
#include <mbctype.h>
#include "UnicodeString.h"
@@ -21,7 +21,7 @@
static char THIS_FILE[] = __FILE__;
#endif
-using namespace std;
+using std::vector;
static bool isSafeWhitespace(TCHAR ch);
static bool isWordBreak(int breakType, TCHAR ch);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|