Major header file house cleaning! Should speed up recompilation times by a few percents.

Linux note: There's a chance as usual that this might break something in Linux because Linux and Windows STL headers have different dependencies.  Namely <algorithm> might still be needed in on some of the PrecompiledHeaders.  If so, just re-add it and commit, and make a note:  // yes GCC really needs this one :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3295 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2010-06-25 02:35:27 +00:00
parent 61f7a4ddab
commit e96dbe443f
17 changed files with 38 additions and 95 deletions

View File

@ -23,6 +23,12 @@
class wxOutputStream;
class wxInputStream;
class wxPoint;
class wxRect;
class wxSize;
extern const wxSize wxDefaultSize;
extern const wxPoint wxDefaultPosition;
// This should prove useful....
@ -107,18 +113,17 @@ static const pxEnumEnd_t pxEnumEnd = {};
// translator (which the _() does automatically, and sometimes we don't want that). This is
// a shorthand replacement for wxTRANSLATE.
//
#define wxLt(a) (a)
#ifndef wxLt
# define wxLt(a) a
#endif
#include <wx/string.h>
#include <wx/gdicmn.h> // for wxPoint/wxRect stuff
#include <wx/intl.h>
#include <wx/log.h>
#include "Pcsx2Defs.h"
#include <stdexcept>
#include <algorithm>
#include <string>
#include <cstring> // string.h under c++
#include <cstdio> // stdio.h under c++
#include <cstdlib>

View File

@ -18,7 +18,6 @@
#include "Dependencies.h"
#include <wx/tokenzr.h>
#include <wx/gdicmn.h> // for wxPoint/wxRect stuff
// --------------------------------------------------------------------------------------

View File

@ -187,8 +187,8 @@ static __forceinline void memzero_ptr( void *dest )
}
// This function only works on 32-bit alignments.
jASSUME( (MZFbytes & 0x3) == 0 );
jASSUME( ((uptr)dest & 0x3) == 0 );
pxAssume( (MZFbytes & 0x3) == 0 );
pxAssume( ((uptr)dest & 0x3) == 0 );
enum
{
@ -278,8 +278,8 @@ static __forceinline void memset_8( void *dest )
if( bytes128 > 32 )
{
// This function only works on 128-bit alignments.
jASSUME( (MZFbytes & 0xf) == 0 );
jASSUME( ((uptr)dest & 0xf) == 0 );
pxAssume( (MZFbytes & 0xf) == 0 );
pxAssume( ((uptr)dest & 0xf) == 0 );
__asm
{
@ -323,7 +323,7 @@ static __forceinline void memset_8( void *dest )
}*/
// This function only works on 32-bit alignments of data copied.
jASSUME( (MZFbytes & 0x3) == 0 );
pxAssume( (MZFbytes & 0x3) == 0 );
enum
{
@ -396,8 +396,8 @@ static __forceinline void memset_16( void *dest )
{
if( MZFbytes == 0 ) return;
if( (MZFbytes & 0x1) != 0 )
throw Exception::LogicError( "Invalid parameter passed to memset_16 - data length is not a multiple of 16 or 32 bits." );
// Assertion: data length must be a multiple of 16 or 32 bits
pxAssume( (MZFbytes & 0x1) == 0 );
if( (MZFbytes & 0x3) != 0 )
{
@ -411,7 +411,7 @@ static __forceinline void memset_16( void *dest )
//u64 _xmm_backup[2];
// This function only works on 32-bit alignments of data copied.
jASSUME( (MZFbytes & 0x3) == 0 );
pxAssume( (MZFbytes & 0x3) == 0 );
enum
{
@ -484,9 +484,8 @@ static __forceinline void memset_32( void *dest )
{
if( MZFbytes == 0 ) return;
if( (MZFbytes & 0x3) != 0 )
throw Exception::LogicError( "Invalid parameter passed to memset_32 - data length is not a multiple of 32 bits." );
// Assertion: data length must be a multiple of 32 bits
pxAssume( (MZFbytes & 0x3) == 0 );
//u64 _xmm_backup[2];
@ -494,7 +493,7 @@ static __forceinline void memset_32( void *dest )
// If the data length is not a factor of 32 bits, the C++ optimizing compiler will
// probably just generate mysteriously broken code in Release builds. ;)
jASSUME( (MZFbytes & 0x3) == 0 );
pxAssume( (MZFbytes & 0x3) == 0 );
enum
{

View File

@ -16,6 +16,10 @@
#include "PrecompiledHeader.h"
#include "IniInterface.h"
#include <wx/gdicmn.h>
const wxRect wxDefaultRect( wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxDefaultCoord );
static int _calcEnumLength( const wxChar* const* enumArray )
{
int cnt = 0;

View File

@ -6,10 +6,6 @@
#include "Dependencies.h"
using std::string;
using std::min;
using std::max;
#include "Assertions.h"
#include "MemcpyFast.h"
#include "Console.h"

View File

@ -14,9 +14,7 @@
*/
#include "PrecompiledHeader.h"
const wxRect wxDefaultRect( wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxDefaultCoord );
#include <wx/gdicmn.h> // for wxPoint/wxRect stuff
__forceinline wxString fromUTF8( const char* src )
{

View File

@ -613,7 +613,7 @@ repeat:
// let's add support for std::string as a formatted parameter! (air)
if( qualifier == 'h' )
{
static const string nullstring( "<NULL>" );
static const std::string nullstring( "<NULL>" );
const std::string* ss = va_arg(args, std::string*);
if( ss == NULL ) ss = &nullstring;

View File

@ -5,24 +5,14 @@
#define EMITTER_PRECOMPILED_HEADER
#include <wx/string.h>
#include <wx/tokenzr.h>
#include <wx/gdicmn.h> // for wxPoint/wxRect stuff
#include <wx/intl.h>
#include <wx/log.h>
#include "Pcsx2Defs.h"
#include <stdexcept>
#include <algorithm>
#include <string>
#include <cstring> // string.h under c++
#include <cstdio> // stdio.h under c++
#include <cstdlib>
using std::string;
using std::min;
using std::max;
#include "Utilities/Console.h"
#include "Utilities/Exceptions.h"
#include "Utilities/General.h"

View File

@ -234,8 +234,7 @@ set(pcsx2Headers
sio_internal.h
SPR.h
Stats.h
StringUtils.h
SysForwardDefs.h
SysForwardDefs.h
System.h
Vif_Dma.h
Vif.h

View File

@ -20,6 +20,8 @@
#include "R5900.h"
#include "VU.h"
using std::string;
const char * const disRNameCP2f[] = {
"VF00", "VF01", "VF02", "VF03", "VF04", "VF05", "VF06", "VF07",
"VF08", "VF09", "VF10", "VF11", "VF12", "VF13", "VF14", "VF15",

View File

@ -25,6 +25,8 @@
#include "Utilities/AsciiFile.h"
using namespace R5900;
using std::string;
// fixme: currently should not be uncommented.
//#define TEST_BROKEN_DUMP_ROUTINES

View File

@ -20,7 +20,9 @@
// macro provided for tagging translation strings, without actually running them through the
// translator (which the _() does automatically, and sometimes we don't want that). This is
// a shorthand replacement for wxTRANSLATE.
#define wxLt(a) (a)
#ifndef wxLt
# define wxLt(a) a
#endif
#define NOMINMAX // Disables other libs inclusion of their own min/max macros (we use std instead)
@ -29,7 +31,6 @@
#include <wx/string.h>
#include <wx/tokenzr.h>
#include <wx/gdicmn.h> // for wxPoint/wxRect stuff
#include <wx/intl.h>
#include <wx/log.h>
#include <wx/filename.h>
@ -38,18 +39,11 @@
// Include the STL junk that's actually handy.
#include <stdexcept>
#include <algorithm>
#include <vector>
#include <string>
#include <list>
#include <deque>
#include <sstream>
#include <cstring> // string.h under c++
#include <cstdio> // stdio.h under c++
#include <cstdlib>
#include <iostream>
#include <sstream>
#include <fstream>
// ... and include some ANSI/POSIX C libs that are useful too, just for good measure.
// (these compile lightning fast with or without PCH, but they never change so
@ -59,8 +53,6 @@
#include <sys/stat.h>
#include <pthread.h>
using std::string; // we use it enough, so bring it into the global namespace.
using std::min;
using std::max;
@ -117,14 +109,6 @@ typedef int BOOL;
# define __declspec(x)
# endif
# ifndef strnicmp
# define strnicmp strncasecmp
# endif
# ifndef stricmp
# define stricmp strcasecmp
# endif
#endif // end GCC/Linux stuff
#endif

View File

@ -635,7 +635,7 @@ void __fastcall eeloadReplaceOSDSYS()
}
pxAssert(osdsys_p);
string elfname;
std::string elfname;
if (!elf_override.IsEmpty())
{

View File

@ -1,33 +0,0 @@
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2010 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <string>
#include <cstdarg>
#include <sstream>
// to_string: A utility template for quick and easy inline string type conversion.
// Use to_string(intval), or to_string(float), etc. Anything that the STL itself
// would support should be supported here. :)
// Notice: Obsolete, use wxString features instead.
template< typename T >
std::string to_string(const T& value)
{
std::ostringstream oss;
oss << value;
return oss.str();
}

View File

@ -20,7 +20,7 @@ void AsciiFile::Printf( const char* fmt, ... )
{
va_list list;
va_start( list, fmt );
string writeme; vssprintf( writeme, fmt, list );
std::string writeme; vssprintf( writeme, fmt, list );
va_end( list );
Write( writeme.c_str(), writeme.length() );
}

View File

@ -315,10 +315,6 @@
RelativePath="..\..\Utilities\FileUtils.cpp"
>
</File>
<File
RelativePath="..\..\StringUtils.h"
>
</File>
</Filter>
<Filter
Name="Patch"

View File

@ -20,6 +20,8 @@ class AsciiFile;
using namespace std;
using namespace x86Emitter;
#include <deque>
#include "VU.h"
#include "GS.h"
#include "iR5900.h"