mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-22 09:30:15 +00:00
Qualified all STL refs with std:: to get rid of the 'using namespace std' mismatch between the main code & debugger code
This commit is contained in:
parent
c1bfb8075c
commit
cbdad2a02f
@ -767,7 +767,7 @@ LPSTR GetNextArg(LPSTR lpCmdLine)
|
||||
|
||||
static int DoDiskInsert(const int nDrive, LPCSTR szFileName)
|
||||
{
|
||||
string strPathName;
|
||||
std::string strPathName;
|
||||
|
||||
if (szFileName[0] == '\\' || szFileName[1] == ':')
|
||||
{
|
||||
|
@ -56,7 +56,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
bool g_bDebuggerEatKey = false;
|
||||
|
||||
// Bookmarks __________________________________________________________________
|
||||
// vector<int> g_aBookmarks;
|
||||
int g_nBookmarks = 0;
|
||||
Bookmark_t g_aBookmarks[ MAX_BOOKMARKS ];
|
||||
|
||||
@ -126,8 +125,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
int g_iCommand; // last command (enum) // used for consecutive commands
|
||||
|
||||
vector<int> g_vPotentialCommands; // global, since TAB-completion also needs
|
||||
vector<Command_t> g_vSortedCommands;
|
||||
std::vector<int> g_vPotentialCommands; // global, since TAB-completion also needs
|
||||
std::vector<Command_t> g_vSortedCommands;
|
||||
|
||||
// static const char g_aFlagNames[_6502_NUM_FLAGS+1] = TEXT("CZIDBRVN");// Reversed since arrays are from left-to-right
|
||||
|
||||
@ -1615,7 +1614,7 @@ void _BWZ_ListAll( const Breakpoint_t * aBreakWatchZero, const int nMax )
|
||||
Update_t CmdBreakpointList (int nArgs)
|
||||
{
|
||||
// ConsoleBufferPush( );
|
||||
// vector<int> vBreakpoints;
|
||||
// std::vector<int> vBreakpoints;
|
||||
// int iBreakpoint = MAX_BREAKPOINTS;
|
||||
// while (iBreakpoint--)
|
||||
// {
|
||||
@ -1624,7 +1623,7 @@ Update_t CmdBreakpointList (int nArgs)
|
||||
// vBreakpoints.push_back( g_aBreakpoints[iBreakpoint].address );
|
||||
// }
|
||||
// }
|
||||
// sort( vBreakpoints.begin(), vBreakpoints.end() );
|
||||
// std::sort( vBreakpoints.begin(), vBreakpoints.end() );
|
||||
// iBreakpoint = vBreakPoints.size();
|
||||
|
||||
if (! g_nBreakpoints)
|
||||
@ -3194,7 +3193,7 @@ Update_t CmdCursorLineUp (int nArgs)
|
||||
|
||||
const int MAX_LOOK_AHEAD = g_nDisasmWinHeight;
|
||||
|
||||
static vector<LookAhead_t> aTopCandidates;
|
||||
static std::vector<LookAhead_t> aTopCandidates;
|
||||
LookAhead_t tCandidate;
|
||||
|
||||
// if (! aBestTop.capacity() )
|
||||
@ -5256,9 +5255,7 @@ Update_t CmdOutputPrintf (int nArgs)
|
||||
|
||||
TCHAR sText[ CONSOLE_WIDTH ] = TEXT("");
|
||||
|
||||
// vector<PrintFormat_t> aValues;
|
||||
// PrintFormat_t entry;
|
||||
vector<Arg_t> aValues;
|
||||
std::vector<Arg_t> aValues;
|
||||
Arg_t entry;
|
||||
int iValue = 0;
|
||||
int nValue = 0;
|
||||
@ -6715,7 +6712,7 @@ int FindCommand( LPTSTR pName, CmdFuncPtr_t & pFunction_, int * iCommand_ )
|
||||
g_iCommand = g_aCommands[iCommand].iCommand;
|
||||
|
||||
// Don't push the same comamnd/alias if already on the list
|
||||
if (find( g_vPotentialCommands.begin(), g_vPotentialCommands.end(), g_iCommand) == g_vPotentialCommands.end())
|
||||
if (std::find( g_vPotentialCommands.begin(), g_vPotentialCommands.end(), g_iCommand) == g_vPotentialCommands.end())
|
||||
{
|
||||
nFound++;
|
||||
g_vPotentialCommands.push_back( g_iCommand );
|
||||
@ -7195,12 +7192,12 @@ void ProfileFormat( bool bExport, ProfileFormat_e eFormatMode )
|
||||
bool bOpcodeGood = true;
|
||||
bool bOpmodeGood = true;
|
||||
|
||||
vector< ProfileOpcode_t > vProfileOpcode( &g_aProfileOpcodes[0], &g_aProfileOpcodes[ NUM_OPCODES ] );
|
||||
vector< ProfileOpmode_t > vProfileOpmode( &g_aProfileOpmodes[0], &g_aProfileOpmodes[ NUM_OPMODES ] );
|
||||
std::vector< ProfileOpcode_t > vProfileOpcode( &g_aProfileOpcodes[0], &g_aProfileOpcodes[ NUM_OPCODES ] );
|
||||
std::vector< ProfileOpmode_t > vProfileOpmode( &g_aProfileOpmodes[0], &g_aProfileOpmodes[ NUM_OPMODES ] );
|
||||
|
||||
// sort >
|
||||
sort( vProfileOpcode.begin(), vProfileOpcode.end(), ProfileOpcode_t() );
|
||||
sort( vProfileOpmode.begin(), vProfileOpmode.end(), ProfileOpmode_t() );
|
||||
std::sort( vProfileOpcode.begin(), vProfileOpcode.end(), ProfileOpcode_t() );
|
||||
std::sort( vProfileOpmode.begin(), vProfileOpmode.end(), ProfileOpmode_t() );
|
||||
|
||||
Profile_t nOpcodeTotal = 0;
|
||||
Profile_t nOpmodeTotal = 0;
|
||||
|
@ -1,10 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm> // sort, find
|
||||
#include <map>
|
||||
using namespace std;
|
||||
|
||||
#include "..\Structs.h"
|
||||
#include "..\Common.h"
|
||||
|
||||
@ -30,7 +25,6 @@ using namespace std;
|
||||
// Bookmarks
|
||||
extern int g_nBookmarks;
|
||||
extern Bookmark_t g_aBookmarks[ MAX_BOOKMARKS ];
|
||||
// extern vector<int> g_aBookmarks;
|
||||
|
||||
// Breakpoints
|
||||
enum BreakpointHit_t
|
||||
@ -121,7 +115,7 @@ using namespace std;
|
||||
extern MemoryDump_t g_aMemDump[ NUM_MEM_DUMPS ];
|
||||
|
||||
// extern MemorySearchArray_t g_vMemSearchMatches;
|
||||
extern vector<int> g_vMemorySearchResults;
|
||||
extern std::vector<int> g_vMemorySearchResults;
|
||||
|
||||
// Source Level Debugging
|
||||
extern TCHAR g_aSourceFileName[ MAX_PATH ];
|
||||
|
@ -75,7 +75,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
// Disassembler Data _____________________________________________________________________________
|
||||
|
||||
vector<DisasmData_t> g_aDisassemblerData;
|
||||
std::vector<DisasmData_t> g_aDisassemblerData;
|
||||
|
||||
|
||||
// Instructions / Opcodes _________________________________________________________________________
|
||||
@ -401,7 +401,7 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
|
||||
};
|
||||
|
||||
int m_bAsmFlags;
|
||||
vector<int> m_vAsmOpcodes;
|
||||
std::vector<int> m_vAsmOpcodes;
|
||||
int m_iAsmAddressMode = AM_IMPLIED;
|
||||
|
||||
struct DelayedTarget_t
|
||||
@ -412,7 +412,7 @@ Fx BEQ r SBC (d),Y sbc (d) --- --- SBC d,X INC d,X --- SED SBC a,Y
|
||||
int m_iOpmode ; // AddressingMode_e
|
||||
};
|
||||
|
||||
vector <DelayedTarget_t> m_vDelayedTargets;
|
||||
std::vector <DelayedTarget_t> m_vDelayedTargets;
|
||||
bool m_bDelayedTargetsDirty = false;
|
||||
|
||||
int m_nAsmBytes = 0;
|
||||
@ -886,7 +886,7 @@ void AssemblerStartup()
|
||||
void _CmdAssembleHashDump ()
|
||||
{
|
||||
// #if DEBUG_ASM_HASH
|
||||
vector<HashOpcode_t> vHashes;
|
||||
std::vector<HashOpcode_t> vHashes;
|
||||
HashOpcode_t tHash;
|
||||
TCHAR sText[ CONSOLE_WIDTH ];
|
||||
|
||||
@ -898,7 +898,7 @@ void _CmdAssembleHashDump ()
|
||||
vHashes.push_back( tHash );
|
||||
}
|
||||
|
||||
sort( vHashes.begin(), vHashes.end(), HashOpcode_t() );
|
||||
std::sort( vHashes.begin(), vHashes.end(), HashOpcode_t() );
|
||||
|
||||
Hash_t nPrevHash = vHashes.at( 0 ).m_nValue;
|
||||
Hash_t nThisHash = 0;
|
||||
@ -1349,7 +1349,7 @@ void AssemblerProcessDelayedSymols()
|
||||
{
|
||||
bModified = false;
|
||||
|
||||
vector<DelayedTarget_t>::iterator iSymbol;
|
||||
std::vector<DelayedTarget_t>::iterator iSymbol;
|
||||
for( iSymbol = m_vDelayedTargets.begin(); iSymbol != m_vDelayedTargets.end(); ++iSymbol )
|
||||
{
|
||||
DelayedTarget_t *pTarget = & (*iSymbol); // m_vDelayedTargets.at( iSymbol );
|
||||
|
@ -201,7 +201,7 @@ extern int g_aAssemblerFirstDirective[ NUM_ASSEMBLERS ];
|
||||
bool _6502_IsOpcodeValid( int nOpcode );
|
||||
|
||||
int AssemblerHashMnemonic ( const TCHAR * pMnemonic );
|
||||
// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, vector<int> & vOpcodes );
|
||||
// bool AssemblerGetAddressingMode ( int iArg, int nArgs, WORD nAddress, std::vector<int> & vOpcodes );
|
||||
void _CmdAssembleHashDump ();
|
||||
|
||||
int AssemblerDelayedTargetsSize();
|
||||
|
@ -50,7 +50,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
// Buffer
|
||||
bool g_bConsoleBufferPaused = false; // buffered output is waiting for user to continue
|
||||
int g_nConsoleBuffer = 0;
|
||||
conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: stl::vector< line_t >
|
||||
conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: std::vector< line_t >
|
||||
|
||||
// Cursor
|
||||
char g_sConsoleCursor[] = "_";
|
||||
|
@ -189,7 +189,7 @@
|
||||
// Buffer
|
||||
extern bool g_bConsoleBufferPaused;
|
||||
extern int g_nConsoleBuffer;
|
||||
extern conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: stl::vector< line_t >
|
||||
extern conchar_t g_aConsoleBuffer[ CONSOLE_BUFFER_HEIGHT ][ CONSOLE_WIDTH ]; // TODO: std::vector< line_t >
|
||||
|
||||
// Cursor
|
||||
extern char g_sConsoleCursor[];
|
||||
|
@ -14,6 +14,6 @@
|
||||
void Disassembly_DelData( DisasmData_t tData);
|
||||
DisasmData_t* Disassembly_Enumerate( DisasmData_t *pCurrent = NULL );
|
||||
|
||||
extern vector<DisasmData_t> g_aDisassemblerData;
|
||||
extern std::vector<DisasmData_t> g_aDisassemblerData;
|
||||
|
||||
#endif
|
||||
|
@ -1439,7 +1439,7 @@ Update_t CmdHelpList (int nArgs)
|
||||
int nMaxWidth = g_nConsoleDisplayWidth - 1;
|
||||
int iCommand;
|
||||
|
||||
extern vector<Command_t> g_vSortedCommands;
|
||||
extern std::vector<Command_t> g_vSortedCommands;
|
||||
|
||||
if (! g_vSortedCommands.size())
|
||||
{
|
||||
|
@ -106,7 +106,7 @@ const char* FindSymbolFromAddress (WORD nAddress, int * iTable_ )
|
||||
if (! (g_bDisplaySymbolTables & (1 << iTable)))
|
||||
continue;
|
||||
|
||||
map<WORD, string>::iterator iSymbols = g_aSymbols[iTable].find(nAddress);
|
||||
std::map<WORD, std::string>::iterator iSymbols = g_aSymbols[iTable].find(nAddress);
|
||||
if(g_aSymbols[iTable].find(nAddress) != g_aSymbols[iTable].end())
|
||||
{
|
||||
if (iTable_)
|
||||
@ -131,7 +131,6 @@ bool FindAddressFromSymbol ( const char* pSymbol, WORD * pAddress_, int * iTable
|
||||
if (! (g_bDisplaySymbolTables & (1 << iTable)))
|
||||
continue;
|
||||
|
||||
// map<WORD, string>::iterator iSymbol = g_aSymbols[iTable].begin();
|
||||
SymbolTable_t :: iterator iSymbol = g_aSymbols[iTable].begin();
|
||||
while (iSymbol != g_aSymbols[iTable].end())
|
||||
{
|
||||
@ -455,7 +454,6 @@ Update_t _CmdSymbolsListTables (int nArgs, int bSymbolTables )
|
||||
int nSymbols = g_aSymbols[iTable].size();
|
||||
if (nSymbols)
|
||||
{
|
||||
// map<WORD, string>::iterator iSymbol = g_aSymbols[iTable].begin();
|
||||
SymbolTable_t :: iterator iSymbol = g_aSymbols[iTable].begin();
|
||||
while (iSymbol != g_aSymbols[iTable].end())
|
||||
{
|
||||
|
@ -1161,8 +1161,8 @@ const DisasmData_t* pDisasmData;
|
||||
bool m_bFound ; //
|
||||
};
|
||||
|
||||
typedef vector<MemorySearch_t> MemorySearchValues_t;
|
||||
typedef vector<int> MemorySearchResults_t;
|
||||
typedef std::vector<MemorySearch_t> MemorySearchValues_t;
|
||||
typedef std::vector<int> MemorySearchResults_t;
|
||||
|
||||
// Parameters _____________________________________________________________________________________
|
||||
|
||||
@ -1419,7 +1419,7 @@ const DisasmData_t* pDisasmData;
|
||||
NO_SOURCE_LINE = -1
|
||||
};
|
||||
|
||||
typedef map<WORD, int> SourceAssembly_t; // Address -> Line # & FileName
|
||||
typedef std::map<WORD, int> SourceAssembly_t; // Address -> Line # & FileName
|
||||
|
||||
|
||||
// Symbols ________________________________________________________________________________________
|
||||
@ -1459,7 +1459,7 @@ const DisasmData_t* pDisasmData;
|
||||
SYMBOL_TABLE_PRODOS = (1 << 8),
|
||||
};
|
||||
|
||||
typedef map<WORD, string> SymbolTable_t;
|
||||
typedef std::map<WORD, std::string> SymbolTable_t;
|
||||
|
||||
|
||||
// Watches ________________________________________________________________________________________
|
||||
|
@ -22,8 +22,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
#include "Util_Text.h"
|
||||
#include "Util_MemoryTextFile.h"
|
||||
|
@ -4,8 +4,8 @@
|
||||
|
||||
class MemoryTextFile_t
|
||||
{
|
||||
vector<char > m_vBuffer;
|
||||
vector<char *> m_vLines ; // array of pointers to start of lines
|
||||
std::vector<char > m_vBuffer;
|
||||
std::vector<char *> m_vLines ; // array of pointers to start of lines
|
||||
bool m_bDirty ; // line pointers not up-to-date
|
||||
|
||||
void GetLinePointers();
|
||||
|
@ -158,7 +158,7 @@ void ResetMachineState ();
|
||||
void SetFullScreenMode ();
|
||||
void SetNormalMode ();
|
||||
void SetUsingCursor (BOOL);
|
||||
static bool FileExists(string strFilename);
|
||||
static bool FileExists(std::string strFilename);
|
||||
|
||||
bool g_bScrollLock_FullSpeed = false;
|
||||
bool g_bFreshReset = false;
|
||||
@ -1854,10 +1854,10 @@ void ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
|
||||
RegLoadString(TEXT("Configuration"), REGVALUE_CIDERPRESSLOC, 1, PathToCiderPress,MAX_PATH);
|
||||
//TODO: A directory is open if an empty path to CiderPress is set. This has to be fixed.
|
||||
|
||||
string filename1= "\"";
|
||||
std::string filename1= "\"";
|
||||
filename1.append( DiskGetDiskPathFilename(iDrive) );
|
||||
filename1.append("\"");
|
||||
string sFileNameEmpty = "\"";
|
||||
std::string sFileNameEmpty = "\"";
|
||||
sFileNameEmpty.append("\"");
|
||||
|
||||
// Load the menu template containing the shortcut menu from the
|
||||
@ -2423,7 +2423,7 @@ void FrameReleaseVideoDC ()
|
||||
|
||||
//===========================================================================
|
||||
// TODO: FIXME: Util_TestFileExists()
|
||||
static bool FileExists(string strFilename)
|
||||
static bool FileExists(std::string strFilename)
|
||||
{
|
||||
struct stat stFileInfo;
|
||||
int intStat = stat(strFilename.c_str(),&stFileInfo);
|
||||
|
@ -76,7 +76,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include <wchar.h>
|
||||
#include <wchar.h> // Only needed for <VS2008 ?
|
||||
|
||||
#include "AppleWin.h"
|
||||
#include "CPU.h"
|
||||
|
@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "StdAfx.h"
|
||||
#include <wchar.h>
|
||||
#include <wchar.h> // Only needed for <VS2008 ?
|
||||
|
||||
#include "AppleWin.h"
|
||||
#include "CPU.h"
|
||||
|
@ -33,6 +33,8 @@
|
||||
#include <htmlhelp.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include <queue>
|
||||
#include <vector>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user