wip removing old STLPort and cleaning up to std::

This commit is contained in:
TTimo 2017-08-06 17:22:08 -05:00
parent 422cd9d40f
commit 7ffb0a94f4
20 changed files with 82 additions and 194 deletions

View File

@ -232,7 +232,6 @@ class Config:
env.Append( CCFLAGS = baseflags )
env.Append( CXXFLAGS = baseflags + [ '-fpermissive', '-fvisibility-inlines-hidden' ] )
env.Append( CPPPATH = [ 'include', 'libs' ] )
env.Append( CPPDEFINES = [ 'Q_NO_STLPORT' ] )
if ( config == 'debug' ):
env.Append( CFLAGS = [ '-g' ] )
env.Append( CXXFLAGS = [ '-g' ] )

View File

@ -335,7 +335,7 @@ void DPatch::Transpose(){
Invert();
}
list<DPatch> DPatch::Split( bool rows, bool cols ){
std::list<DPatch> DPatch::Split( bool rows, bool cols ){
list<DPatch> patchList;
int i;
int x, y;

View File

@ -151,6 +151,6 @@ extern _QEREntityTable g_EntityTable;
#define MAX_ROUND_ERROR 0.05
#include "gtkr_list.h"
#include <list>
#endif

View File

@ -1,23 +0,0 @@
/*
Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
This file is part of GtkRadiant.
GtkRadiant is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GtkRadiant 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 GtkRadiant; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <list>
#include "stl_check.h"

View File

@ -1,23 +0,0 @@
/*
Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
This file is part of GtkRadiant.
GtkRadiant is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GtkRadiant 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 GtkRadiant; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include <vector>
#include "stl_check.h"

View File

@ -1,65 +0,0 @@
/*
Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
This file is part of GtkRadiant.
GtkRadiant is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GtkRadiant 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 GtkRadiant; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
/*!
This header is used to make sure the STL we are using is what we expect
this allows to catch some weird errors early at compile time
*/
// TODO: finish complete cleanup and removal of STLPort usage traces
#ifndef Q_NO_STLPORT
#define Q_NO_STLPORT
#endif
#ifdef Q_NO_STLPORT
// not using STLPort (gcc 3.x build)
using namespace std;
#else
#ifndef _STLPORT_VERSION
#error "Can't find _STLPORT_VERSION, check you are compiling against STLPort"
#endif
#if !defined( _STLP_DONT_USE_EXCEPTIONS )
#error exc
#endif
#if !defined( _STLP_NO_NAMESPACES )
#error namespace
#endif
#if !defined( _STLP_NO_IOSTREAMS )
#error io
#endif
// now check a few more things (paranoid)
// if you use our custom STLPort distribution it should be alright though
#if !defined( _STLP_DONT_USE_EXCEPTIONS ) || !defined( _STLP_NO_NAMESPACES ) || !defined( _STLP_NO_IOSTREAMS )
#error "There is something broken in your STLPort config"
#endif
#ifdef _WIN32
#pragma warning(disable : 4786)
#endif
#endif

View File

@ -77,8 +77,9 @@
#include "libxml/parser.h"
#include "irefcount.h"
#include "gtkr_list.h"
#include "gtkr_vector.h"
#include <vector>
#include <list>
#include "str.h"
@ -197,7 +198,7 @@ class CSynapseAPIManager : public IRefCounted
EAPIManagerType mType;
// the list of APIs we have obtained (SYN_REQUIRE_ANY)
vector< APIDescriptor_t * > mAPIs;
std::vector< APIDescriptor_t * > mAPIs;
/*!
pattern for matching the major version
NOTE: only supported for now: exact match
@ -289,15 +290,15 @@ bool mbActive;
/*!
we store APIDescriptor_t*, the module fills that in at startup
*/
vector<APIDescriptor_t *> mAPIDescriptors;
std::vector<APIDescriptor_t *> mAPIDescriptors;
/*!
managers for multiple APIs management
mManagersMatch are managers with loose matching / undefined number of APIs
mManagersList are managers with a fixed list of required interfaces
*/
vector<CSynapseAPIManager *> mManagersMatch;
vector<CSynapseAPIManager *> mManagersList;
std::vector<CSynapseAPIManager *> mManagersMatch;
std::vector<CSynapseAPIManager *> mManagersList;
protected:
friend class CSynapseServer;
@ -492,13 +493,13 @@ virtual ~CSynapseClientSlot() { }
*/
class CSynapseServer : public IRefCounted
{
list<char *> mSearchPaths;
list<CSynapseClientSlot> mClients;
std::list<char *> mSearchPaths;
std::list<CSynapseClientSlot> mClients;
/*!
used for resolve operations
*/
list<APIDescriptor_t*> mStack;
std::list<APIDescriptor_t*> mStack;
/*!
set this when mStack is modified with new stuff to resolve
NOTE: if this hack becomes too tricky to use we could just encapsulate mStack
@ -552,7 +553,7 @@ void TryPushStack( APIDescriptor_t * );
\param iSlot is an mClients iterator, invalid when the function returns as the item will have been removed from the list
\return the iterator after erase call so that the caller iteration can continue
*/
list<CSynapseClientSlot>::iterator ShutdownClient( list<CSynapseClientSlot>::iterator iSlot );
std::list<CSynapseClientSlot>::iterator ShutdownClient( std::list<CSynapseClientSlot>::iterator iSlot );
/*!
\brief actual implementation of the Resolve function

View File

@ -126,7 +126,7 @@ bool CSynapseServer::Initialize( const char* conf_file, PFN_SYN_PRINTF_VA pf ){
}
}
for ( list<char *>::iterator iPath = mSearchPaths.begin(); iPath != mSearchPaths.end(); iPath++ )
for ( std::list<char *>::iterator iPath = mSearchPaths.begin(); iPath != mSearchPaths.end(); iPath++ )
{
const char* path = *iPath;
@ -290,7 +290,7 @@ PFN_SYN_PRINTF_VA CSynapseServer::Get_Syn_Printf(){
}
void CSynapseServer::TryPushStack( APIDescriptor_t *pAPI ){
list<APIDescriptor_t*>::iterator iAPI;
std::list<APIDescriptor_t*>::iterator iAPI;
for ( iAPI = mStack.begin(); iAPI != mStack.end(); iAPI++ )
{
if ( ( *iAPI ) == pAPI ) {
@ -301,7 +301,7 @@ void CSynapseServer::TryPushStack( APIDescriptor_t *pAPI ){
mbStackChanged = true;
}
list<CSynapseClientSlot>::iterator CSynapseServer::ShutdownClient( list<CSynapseClientSlot>::iterator iSlot ){
std::list<CSynapseClientSlot>::iterator CSynapseServer::ShutdownClient( std::list<CSynapseClientSlot>::iterator iSlot ){
CSynapseClientSlot *pClientSlot = &( *iSlot );
if ( pClientSlot->mpClient->IsActive() ) {
// this should not happen except during core shutdown (i.e. editor is shutting down)
@ -314,7 +314,7 @@ list<CSynapseClientSlot>::iterator CSynapseServer::ShutdownClient( list<CSynapse
{
APIDescriptor_t *pAPI = pClientSlot->mpClient->GetAPIDescriptor( i );
// search this API in mStack
list< APIDescriptor_t *>::iterator iStack = mStack.begin();
std::list< APIDescriptor_t *>::iterator iStack = mStack.begin();
while ( iStack != mStack.end() )
{
if ( *iStack == pAPI ) {
@ -327,7 +327,7 @@ list<CSynapseClientSlot>::iterator CSynapseServer::ShutdownClient( list<CSynapse
if ( pAPI->mbTableInitDone ) {
// even if non active, some SYN_REQUIRE may have been filled up
// look for the corresponding SYN_PROVIDE and decref
list< APIDescriptor_t *>::iterator iStackRequire = mStack.begin();
std::list< APIDescriptor_t *>::iterator iStackRequire = mStack.begin();
APIDescriptor_t *pMatchAPI;
while ( iStackRequire != mStack.end() )
{
@ -400,7 +400,7 @@ void CSynapseServer::PushRequired( CSynapseClient *pClient ){
{
CSynapseAPIManager *pManager = pClient->GetManagerMatch( i );
// start matching all known SYN_PROVIDE APIs against this manager
list<CSynapseClientSlot>::iterator iClientSlot;
std::list<CSynapseClientSlot>::iterator iClientSlot;
for ( iClientSlot = mClients.begin(); iClientSlot != mClients.end(); iClientSlot++ )
{
CSynapseClient *pScanClient = ( *iClientSlot ).
@ -428,7 +428,7 @@ void CSynapseServer::PushRequired( CSynapseClient *pClient ){
int CSynapseServer::FindActiveMajorClient( const char * major, APIDescriptor_t ** ret ) const {
Syn_Printf( "checking if we have a single active client for major \"%s\"\n", major );
*ret = NULL;
list<CSynapseClientSlot>::const_iterator iClient;
std::list<CSynapseClientSlot>::const_iterator iClient;
for ( iClient = mClients.begin(); iClient != mClients.end(); iClient++ ) {
CSynapseClient *pClient = ( *iClient ).mpClient;
if ( !pClient->IsActive() ) {
@ -507,7 +507,7 @@ int CSynapseServer::MatchAPI( const char* major1, const char* minor1, const char
bool CSynapseServer::ResolveAPI( APIDescriptor_t* pAPI ){
//Syn_Printf("In ResolveAPI %s %p '%s' '%s'\n", APITypeName[pAPI->mType], pAPI, pAPI->major_name, pAPI->minor_name);
// loop through active clients, search for a client providing what we are looking for
list<CSynapseClientSlot>::iterator iClient;
std::list<CSynapseClientSlot>::iterator iClient;
for ( iClient = mClients.begin(); iClient != mClients.end(); iClient++ )
{
// walk through interfaces on this client for a match
@ -557,7 +557,7 @@ bool CSynapseServer::ResolveAPI( APIDescriptor_t* pAPI ){
}
bool CSynapseServer::DoResolve( CSynapseClient *pClient ){
list<CSynapseClientSlot>::iterator iSlot;
std::list<CSynapseClientSlot>::iterator iSlot;
for ( iSlot = mClients.begin(); iSlot != mClients.end(); iSlot++ )
{
if ( ( *iSlot ).mpClient == pClient ) {
@ -585,7 +585,7 @@ bool CSynapseServer::DoResolve( CSynapseClient *pClient ){
// start resolving now
// working till the stack is emptied or till we reach a dead end situation
// we do a depth first traversal, we will grow the interface stack to be resolved till we start finding solutions
list<APIDescriptor_t*>::iterator iCurrent;
std::list<APIDescriptor_t*>::iterator iCurrent;
mbStackChanged = true; // init to true so we try the first elem
while ( !mStack.empty() )
{
@ -619,7 +619,7 @@ bool CSynapseServer::DoResolve( CSynapseClient *pClient ){
bool CSynapseServer::Resolve( CSynapseClient *pClient ){
bool ret = DoResolve( pClient );
list<CSynapseClientSlot>::iterator iClient;
std::list<CSynapseClientSlot>::iterator iClient;
iClient = mClients.begin();
while ( iClient != mClients.end() )
{
@ -639,7 +639,7 @@ void CSynapseServer::Shutdown(){
Syn_Printf( "Synapse server core is shutting down\n" );
// do a first pass to shutdown the clients nicely (i.e. decref, release memory and drop everything)
// we seperate the client shutdown calls from the dlclose cause that part is a clean decref / free situation whereas dlclose will break links without advice
list<CSynapseClientSlot>::iterator iClient;
std::list<CSynapseClientSlot>::iterator iClient;
iClient = mClients.begin();
for ( iClient = mClients.begin(); iClient != mClients.end(); iClient++ )
{
@ -654,7 +654,7 @@ void CSynapseServer::Shutdown(){
}
void CSynapseServer::DumpStack(){
list<APIDescriptor_t*>::iterator iCurrent;
std::list<APIDescriptor_t*>::iterator iCurrent;
for ( iCurrent = mStack.begin(); iCurrent != mStack.end(); iCurrent++ )
{
APIDescriptor_t*pAPI = *iCurrent;
@ -663,7 +663,7 @@ void CSynapseServer::DumpStack(){
}
void CSynapseServer::DumpActiveClients(){
list<CSynapseClientSlot>::iterator iClient;
std::list<CSynapseClientSlot>::iterator iClient;
for ( iClient = mClients.begin(); iClient != mClients.end(); iClient++ )
{
CSynapseClient *pClient = ( *iClient ).mpClient;
@ -757,7 +757,7 @@ bool CSynapseServer::GetConfigForAPI( const char *api, char **minor ) {
}
const char *CSynapseServer::GetModuleFilename( CSynapseClient *pClient ){
list<CSynapseClientSlot>::iterator iSlot;
std::list<CSynapseClientSlot>::iterator iSlot;
for ( iSlot = mClients.begin(); iSlot != mClients.end(); iSlot++ )
{
if ( ( *iSlot ).mpClient == pClient ) {
@ -783,7 +783,7 @@ CSynapseClient::CSynapseClient(){
}
void CSynapseClient::Shutdown(){
vector<APIDescriptor_t *>::iterator iAPI;
std::vector<APIDescriptor_t *>::iterator iAPI;
for ( iAPI = mAPIDescriptors.begin(); iAPI != mAPIDescriptors.end(); iAPI++ )
{
APIDescriptor_t *pAPI = *iAPI;
@ -795,7 +795,7 @@ void CSynapseClient::Shutdown(){
*iAPI = NULL;
}
mAPIDescriptors.clear();
vector<CSynapseAPIManager *>::iterator iManager;
std::vector<CSynapseAPIManager *>::iterator iManager;
for ( iManager = mManagersList.begin(); iManager != mManagersList.end(); iManager++ )
{
CSynapseAPIManager *pManager = *iManager;
@ -919,7 +919,7 @@ bool CSynapseClient::CheckSetActive(){
}
}
// if we have managers with fixed list, those need to be completely filled in too
vector<CSynapseAPIManager *>::iterator iManager;
std::vector<CSynapseAPIManager *>::iterator iManager;
for ( iManager = mManagersList.begin(); iManager != mManagersList.end(); iManager++ )
{
if ( !( *iManager )->CheckSetActive() ) {
@ -986,7 +986,7 @@ APIDescriptor_t * CSynapseClient::FindProvidesMajor( const char * major ) const
}
CSynapseAPIManager::~CSynapseAPIManager(){
vector<APIDescriptor_t *>::iterator iAPI;
std::vector<APIDescriptor_t *>::iterator iAPI;
for ( iAPI = mAPIs.begin(); iAPI != mAPIs.end(); iAPI++ )
{
APIDescriptor_t *pAPI = *iAPI;
@ -1033,7 +1033,7 @@ bool CSynapseAPIManager::MatchAPI( const char *major, const char *minor ){
/*!
if this interface has been allocated already, avoid requesting it again..
*/
vector<APIDescriptor_t *>::iterator iAPI;
std::vector<APIDescriptor_t *>::iterator iAPI;
for ( iAPI = mAPIs.begin(); iAPI != mAPIs.end(); iAPI++ )
{
if ( CSynapseServer::MatchAPI( ( *iAPI )->major_name, ( *iAPI )->minor_name, major, minor ) ) {

View File

@ -148,7 +148,7 @@ void CPicoModel::Reload( void ){
}
}
void CPicoModel::Draw( int state, vector<IShader*> shaders, int rflags ) const {
void CPicoModel::Draw( int state, std::vector<IShader*> shaders, int rflags ) const {
if ( m_pModel ) {
for ( unsigned int i = 0; i < m_children->len; i++ )
( (CPicoSurface*)m_children->pdata[i] )->Draw( state, shaders[i], rflags );

View File

@ -25,7 +25,7 @@
#include "plugin.h"
#include "picomodel.h"
#include "gtkr_vector.h"
#include <vector>
class CPicoParent
{
@ -36,7 +36,7 @@ virtual void UpdateShaders( void ) = 0;
class CModelManager; // forward declaration
//typedef std::pair<Str, int> PicoModelKey;
typedef pair<Str, int> PicoModelKey;
typedef std::pair<Str, int> PicoModelKey;
class CPicoModel : public IRender, public ISelect
{
@ -63,7 +63,7 @@ void RemoveParent( CPicoParent *parent );
void Reload( void );
void Draw( int state, vector<IShader*> shaders, int rflags ) const;
void Draw( int state, std::vector<IShader*> shaders, int rflags ) const;
//IRender
virtual void Draw( int state, int rflags ) const;
virtual const bool IsModelNotNull() const { return true; }

View File

@ -75,7 +75,7 @@ typedef CPicoModel value_type;
public:
typedef PicoModelKey key_type;
typedef cache_element<key_type, value_type> elem_type;
typedef map<key_type, elem_type> cache_type;
typedef std::map<key_type, elem_type> cache_type;
value_type* capture( const key_type& key ){
return m_cache[key].capture( key );
@ -268,9 +268,9 @@ Str m_name;
int m_frame;
CPicoModel* m_model;
typedef vector<remap_t *> remaps_t;
typedef std::vector<remap_t *> remaps_t;
remaps_t m_remaps;
typedef vector<IShader*> shaders_t;
typedef std::vector<IShader*> shaders_t;
shaders_t m_shaders;
};

View File

@ -38,9 +38,9 @@
// #define DBG_SI 1
#endif
#include "gtkr_vector.h"
#include <vector>
vector<texdef_to_face_t> g_texdef_face_vector;
std::vector<texdef_to_face_t> g_texdef_face_vector;
inline texdef_to_face_t* get_texdef_face_list(){
return &( *g_texdef_face_vector.begin() );

View File

@ -34,9 +34,9 @@
//#define DBG_SI 1
#endif
#include "gtkr_vector.h"
#include <vector>
vector<texdef_to_face_t> g_texdef_face_vector;
std::vector<texdef_to_face_t> g_texdef_face_vector;
inline texdef_to_face_t* get_texdef_face_list(){
return &( *g_texdef_face_vector.begin() );

View File

@ -932,7 +932,7 @@ void MainFrame::process_xlink( Str &FileName, const char *menu_name, const char
void MainFrame::create_game_help_menu( GtkWidget *menu, GtkAccelGroup *accel ){
Str FileName;
list<CGameDescription *>::iterator iGame;
std::list<CGameDescription *>::iterator iGame;
// start in the global dir
FileName = g_strAppPath;

View File

@ -31,7 +31,7 @@
#include "pluginmanager.h"
#include "plugin.h"
#include "gtkr_vector.h"
#include <vector>
#ifdef __APPLE__
#define __toascii( c ) ( ( c ) & 0x7f )
@ -469,7 +469,7 @@ protected:
/*!
the urls to fire up in the game packs help menus
*/
vector<Str *> mHelpURLs;
std::vector<Str *> mHelpURLs;
/*!
scan the .game files for game install packs

View File

@ -107,8 +107,8 @@ private:
string_t m_name;
string_t m_pattern;
};
typedef vector<filetype_copy_t> filetype_list_t;
map<string_t, filetype_list_t> m_typelists;
typedef std::vector<filetype_copy_t> filetype_list_t;
std::map<string_t, filetype_list_t> m_typelists;
};
static RadiantFileTypeRegistry g_patterns;
@ -141,7 +141,7 @@ void InitFileTypes(){
class CRadiantModelModuleManager : public CSynapseAPIManager
{
typedef list<APIDescriptor_t*> APIDescriptorList;
typedef std::list<APIDescriptor_t*> APIDescriptorList;
APIDescriptorList mAPIs;
public:
@ -298,7 +298,7 @@ IModelCache* GetModelCache(){
// toolbar manager
class CRadiantToolbarModuleManager : public CSynapseAPIManager
{
typedef list<APIDescriptor_t*> APIDescriptorList;
typedef std::list<APIDescriptor_t*> APIDescriptorList;
APIDescriptorList mAPIs;
public:
@ -351,7 +351,7 @@ CRadiantToolbarModuleManager g_ToolbarModuleManager;
/* image manager ---------------------------------------- */
CRadiantImageManager::~CRadiantImageManager(){
list<CImageTableSlot *>::iterator iSlot;
std::list<CImageTableSlot *>::iterator iSlot;
for ( iSlot = mSlots.begin(); iSlot != mSlots.end(); iSlot++ )
{
delete *iSlot;
@ -393,7 +393,7 @@ void CRadiantImageManager::LoadImage( const char *name, byte **pic, int *width,
if ( ext == NULL ) {
// if no extension is provided, start walking through the list
Str fullname;
list<CImageTableSlot *>::iterator iSlot;
std::list<CImageTableSlot *>::iterator iSlot;
for ( iSlot = mSlots.begin(); iSlot != mSlots.end(); iSlot++ )
{
APIDescriptor_t *pAPI = ( *iSlot )->GetDescriptor();
@ -407,7 +407,7 @@ void CRadiantImageManager::LoadImage( const char *name, byte **pic, int *width,
}
// start walking the interfaces
list<CImageTableSlot *>::iterator iSlot;
std::list<CImageTableSlot *>::iterator iSlot;
for ( iSlot = mSlots.begin(); iSlot != mSlots.end(); iSlot++ )
{
APIDescriptor_t *pAPI = ( *iSlot )->GetDescriptor();
@ -440,7 +440,7 @@ APIDescriptor_t* CRadiantPluginManager::BuildRequireAPI( APIDescriptor_t *pAPI )
}
void CRadiantPluginManager::PopulateMenu(){
list<CPluginSlot *>::iterator iPlug;
std::list<CPluginSlot *>::iterator iPlug;
for ( iPlug = mSlots.begin(); iPlug != mSlots.end(); iPlug++ )
{
g_pParentWnd->AddPlugInMenuItem( *iPlug );
@ -558,7 +558,7 @@ void CPluginSlot::Dispatch( const char *p ){
}
CRadiantPluginManager::~CRadiantPluginManager(){
list<CPluginSlot *>::iterator iSlot;
std::list<CPluginSlot *>::iterator iSlot;
for ( iSlot = mSlots.begin(); iSlot != mSlots.end(); iSlot++ )
{
delete *iSlot;
@ -567,7 +567,7 @@ CRadiantPluginManager::~CRadiantPluginManager(){
}
bool CRadiantPluginManager::Dispatch( int n, const char* p ){
list<CPluginSlot *>::iterator iPlug;
std::list<CPluginSlot *>::iterator iPlug;
for ( iPlug = mSlots.begin(); iPlug != mSlots.end(); iPlug++ )
{
CPluginSlot *pPlug = *iPlug;

View File

@ -142,7 +142,7 @@ bool ownsCommandID( int n );
class CRadiantPluginManager : public CSynapseAPIManager
{
list<CPluginSlot *> mSlots;
std::list<CPluginSlot *> mSlots;
public:
CRadiantPluginManager() {}
virtual ~CRadiantPluginManager();
@ -182,9 +182,9 @@ void InitForFillAPITable( APIDescriptor_t *pAPI );
class CRadiantImageManager : public CSynapseAPIManager
{
list<CImageTableSlot *> mSlots;
std::list<CImageTableSlot *> mSlots;
list<CImageTableSlot *>::iterator mExtScanSlot;
std::list<CImageTableSlot *>::iterator mExtScanSlot;
public:
CRadiantImageManager() {}
virtual ~CRadiantImageManager();

View File

@ -29,7 +29,7 @@
#include "stdafx.h"
#include "gtkmisc.h"
#include "gtkr_list.h"
#include <list>
// externs
extern void MemFile_fprintf( MemStream* pMemFile, const char* pText, ... );
@ -2901,7 +2901,7 @@ void Patch_TransformLODTexture( patchMesh_t *p, float fx, float fy, transformtyp
BTree_TransformTexture( p->colLOD[( ( ( row - 1 ) / 2 ) * p->width ) + col], fx, fy, xform );
}
void Patch_AddBTreeToDrawListInOrder( list<drawVert_t> *drawList, BTNode_t *pBT ){
void Patch_AddBTreeToDrawListInOrder( std::list<drawVert_t> *drawList, BTNode_t *pBT ){
if ( pBT != NULL ) { //traverse InOrder
Patch_AddBTreeToDrawListInOrder( drawList, pBT->left );
if ( pBT->left != NULL && pBT->right != NULL ) {
@ -2911,7 +2911,7 @@ void Patch_AddBTreeToDrawListInOrder( list<drawVert_t> *drawList, BTNode_t *pBT
}
}
void Patch_InterpolateListFromRowBT( list<drawVert_t> *drawList, BTNode_t *rowBT, BTNode_t *rowBTLeft, drawVert_t *vCurve[], float u, float n, float v ){
void Patch_InterpolateListFromRowBT( std::list<drawVert_t> *drawList, BTNode_t *rowBT, BTNode_t *rowBTLeft, drawVert_t *vCurve[], float u, float n, float v ){
if ( rowBT != NULL ) {
Patch_InterpolateListFromRowBT( drawList, rowBT->left, rowBTLeft->left, vCurve, u - n, n * 0.5f, v );
if ( rowBT->left != NULL && rowBT->right != NULL ) {
@ -2935,7 +2935,7 @@ void Patch_InterpolateListFromRowBT( list<drawVert_t> *drawList, BTNode_t *rowBT
}
}
void Patch_TraverseColBTInOrder( list<list<drawVert_t>*>::iterator& iter, BTNode_t *colBTLeft, BTNode_t *colBT, BTNode_t *colBTRight, BTNode_t *rowBT, BTNode_t *rowBTLeft, float v, float n ){
void Patch_TraverseColBTInOrder( std::list<std::list<drawVert_t>*>::iterator& iter, BTNode_t *colBTLeft, BTNode_t *colBT, BTNode_t *colBTRight, BTNode_t *rowBT, BTNode_t *rowBTLeft, float v, float n ){
if ( colBT != NULL ) {
//traverse subtree In Order
Patch_TraverseColBTInOrder( iter, colBTLeft->left, colBT->left, colBTRight->left, rowBT, rowBTLeft, v - n, n * 0.5f );
@ -2954,12 +2954,12 @@ void Patch_TraverseColBTInOrder( list<list<drawVert_t>*>::iterator& iter, BTNode
}
void Patch_StartDrawLists( list<list<drawVert_t>*> *drawLists, BTNode_t *colBT ){
void Patch_StartDrawLists( std::list<std::list<drawVert_t>*> *drawLists, BTNode_t *colBT ){
if ( colBT != NULL ) {
//traverse subtree In Order
Patch_StartDrawLists( drawLists, colBT->left );
if ( colBT->left != NULL && colBT->right != NULL ) {
list<drawVert_t> *newList = new list<drawVert_t>;
std::list<drawVert_t> *newList = new std::list<drawVert_t>;
drawLists->push_back( newList ); // add empty list to back
drawLists->back()->push_back( colBT->vMid );
}
@ -2967,8 +2967,8 @@ void Patch_StartDrawLists( list<list<drawVert_t>*> *drawLists, BTNode_t *colBT )
}
}
typedef list<drawVert_t> drawList_t;
typedef list<list<drawVert_t>*> drawLists_t;
typedef std::list<drawVert_t> drawList_t;
typedef std::list<std::list<drawVert_t>*> drawLists_t;
void Patch_CreateDrawLists( patchMesh_t *patch ){
int col, row, colpos, rowpos;

View File

@ -244,7 +244,7 @@ CXMLPropertyBag::CXMLPropertyBag() {
// generic preference functions
void CXMLPropertyBag::PushAssignment( const char *name, PrefTypes_t type, void *pV ){
list<CPrefAssignment>::iterator iAssign;
std::list<CPrefAssignment>::iterator iAssign;
for ( iAssign = mPrefAssignments.begin(); iAssign != mPrefAssignments.end(); iAssign++ )
{
if ( ( *iAssign ).mName == name ) {
@ -396,7 +396,7 @@ void CXMLPropertyBag::GetPref( const char *name, window_position_t* pV, window_p
void CXMLPropertyBag::UpdatePrefTree(){
// read the assignments and update the tree
list<CPrefAssignment>::iterator iPref;
std::list<CPrefAssignment>::iterator iPref;
for ( iPref = mPrefAssignments.begin(); iPref != mPrefAssignments.end(); iPref++ )
{
CPrefAssignment *pPref = &( *iPref );
@ -1095,7 +1095,7 @@ GtkWidget* CGameDialog::GetGlobalFrame(){
void CGameDialog::UpdateData( bool retrieve ) {
if ( !retrieve ) {
// use m_sGameFile to set m_nComboSelect
list<CGameDescription *>::iterator iGame;
std::list<CGameDescription *>::iterator iGame;
int i = 0;
for ( iGame = mGames.begin(); iGame != mGames.end(); iGame++ )
{
@ -1112,7 +1112,7 @@ void CGameDialog::UpdateData( bool retrieve ) {
Dialog::UpdateData( retrieve );
if ( retrieve ) {
// use m_nComboSelect to set m_sGameFile
list<CGameDescription *>::iterator iGame = mGames.begin();
std::list<CGameDescription *>::iterator iGame = mGames.begin();
int i;
for ( i = 0; i < m_nComboSelect; i++ )
{
@ -1166,7 +1166,7 @@ void CGameDialog::BuildDialog() {
void CGameDialog::UpdateGameCombo() {
// fill in with the game descriptions
list<CGameDescription *>::iterator iGame;
std::list<CGameDescription *>::iterator iGame;
GtkListStore *store;
if ( mGameCombo == NULL ) {
@ -1197,7 +1197,7 @@ void CGameDialog::ScanForGames(){
if ( !mGames.empty() ) {
Sys_Printf( "Clearing game list\n" );
list<CGameDescription*>::iterator iGame;
std::list<CGameDescription*>::iterator iGame;
for ( iGame = mGames.begin(); iGame != mGames.end(); iGame++ ) {
delete ( *iGame );
}
@ -1257,7 +1257,7 @@ void CGameDialog::ScanForGames(){
}
CGameDescription* CGameDialog::GameDescriptionForComboItem(){
list<CGameDescription *>::iterator iGame;
std::list<CGameDescription *>::iterator iGame;
int i = 0;
for ( iGame = mGames.begin(); iGame != mGames.end(); iGame++,i++ ) {
if ( i == m_nComboSelect ) {
@ -1297,7 +1297,7 @@ void CGameDialog::Init(){
LoadPrefs();
if ( m_bAutoLoadGame ) {
// search by .game name
list<CGameDescription *>::iterator iGame;
std::list<CGameDescription *>::iterator iGame;
for ( iGame = mGames.begin(); iGame != mGames.end(); iGame++ )
{
if ( ( *iGame )->mGameFile == m_sGameFile ) {
@ -1345,7 +1345,7 @@ CGameDialog::~CGameDialog(){
g_object_unref( GTK_WIDGET( mFrame ) );
}
// free all the game descriptions
list<CGameDescription *>::iterator iGame;
std::list<CGameDescription *>::iterator iGame;
for ( iGame = mGames.begin(); iGame != mGames.end(); iGame++ )
{
delete ( *iGame );
@ -1356,7 +1356,7 @@ CGameDialog::~CGameDialog(){
void CGameDialog::AddPacksURL( Str &URL ){
// add the URLs for the list of game packs installed
// FIXME: this is kinda hardcoded for now..
list<CGameDescription *>::iterator iGame;
std::list<CGameDescription *>::iterator iGame;
for ( iGame = mGames.begin(); iGame != mGames.end(); iGame++ )
{
if ( ( *iGame )->mGameFile == "q3.game" ) {

View File

@ -23,8 +23,7 @@
#define _PREFERENCES_H_
#include "dialog.h"
#include "gtkr_list.h"
//#include "profile.h"
#include <list>
#ifdef _WIN32
#define NVIDIA_AERO_HACK
@ -79,7 +78,7 @@ xmlNodePtr mpDocNode;
/*!
prefs assignments (what pref name, what type, what variable)
*/
list<CPrefAssignment> mPrefAssignments;
std::list<CPrefAssignment> mPrefAssignments;
/*!
name of file to load/save as
@ -345,7 +344,7 @@ CGameDescription *m_pCurrentGameDescription;
/*!
the list of game descriptions we scanned from the game/ dir
*/
list<CGameDescription *> mGames;
std::list<CGameDescription *> mGames;
CGameDialog() {
mFrame = NULL;
@ -494,7 +493,7 @@ CGameDialog mGamesDialog;
protected:
// warning about old project files
bool m_bWarn;
list<CGameDescription *> mGames;
std::list<CGameDescription *> mGames;
public:
// last light intensity used in the CLightPrompt dialog, stored in registry