Decouple <vector>

This commit is contained in:
Martin Natano
2023-04-21 22:13:41 +02:00
parent aa87f85eef
commit bacecae1f7
422 changed files with 2326 additions and 1295 deletions
+18 -15
View File
@@ -13,6 +13,9 @@
#include "OptionRowHandler.h"
#include "LocalizedString.h"
#include <vector>
static LocalizedString NEW_PROFILE_DEFAULT_NAME( "ScreenOptionsManageProfiles", "NewProfileDefaultName" );
#define SHOW_CREATE_NEW (!PROFILEMAN->FixedProfiles())
@@ -241,7 +244,7 @@ void ScreenOptionsManageProfiles::HandleScreenMessage( const ScreenMessage SM )
if( !ScreenTextEntry::s_bCancelledLast )
{
ASSERT( ScreenTextEntry::s_sLastAnswer != "" ); // validate should have assured this
RString sNewName = ScreenTextEntry::s_sLastAnswer;
PROFILEMAN->RenameLocalProfile( GAMESTATE->m_sEditLocalProfileID, sNewName );
if (PREFSMAN->m_ProfileSortOrder == ProfileSortOrder_Alphabetical)
@@ -299,7 +302,7 @@ void ScreenOptionsManageProfiles::HandleScreenMessage( const ScreenMessage SM )
PlayerNumber pn = (PlayerNumber)(ScreenMiniMenu::s_iLastRowCode - ProfileAction_SetDefaultP1);
ProfileManager::m_sDefaultLocalProfileID[pn].Set( GetLocalProfileIDWithFocus() );
SCREENMAN->SetNewScreen( this->m_sName ); // reload
}
break;
@@ -312,11 +315,11 @@ void ScreenOptionsManageProfiles::HandleScreenMessage( const ScreenMessage SM )
break;
case ProfileAction_Rename:
{
ScreenTextEntry::TextEntry(
SM_BackFromRename,
ENTER_PROFILE_NAME,
pProfile->m_sDisplayName,
PROFILE_MAX_DISPLAY_NAME_LENGTH,
ScreenTextEntry::TextEntry(
SM_BackFromRename,
ENTER_PROFILE_NAME,
pProfile->m_sDisplayName,
PROFILE_MAX_DISPLAY_NAME_LENGTH,
ValidateLocalProfileName );
}
break;
@@ -402,7 +405,7 @@ void ScreenOptionsManageProfiles::ProcessMenuStart( const InputEventPlus & )
int iCurRow = m_iCurrentRow[GAMESTATE->GetMasterPlayerNumber()];
OptionRow &row = *m_pRows[iCurRow];
if( SHOW_CREATE_NEW && iCurRow == 0 ) // "create new"
{
std::vector<RString> vsUsedNames;
@@ -416,11 +419,11 @@ void ScreenOptionsManageProfiles::ProcessMenuStart( const InputEventPlus & )
if( !bNameIsUsed )
break;
}
ScreenTextEntry::TextEntry(
SM_BackFromEnterNameForNew,
ENTER_PROFILE_NAME,
sPotentialName,
PROFILE_MAX_DISPLAY_NAME_LENGTH,
ScreenTextEntry::TextEntry(
SM_BackFromEnterNameForNew,
ENTER_PROFILE_NAME,
sPotentialName,
PROFILE_MAX_DISPLAY_NAME_LENGTH,
ValidateLocalProfileName );
}
else if( row.GetRowType() == OptionRow::RowType_Exit )
@@ -507,7 +510,7 @@ RString ScreenOptionsManageProfiles::GetLocalProfileIDWithFocus() const
/*
* (c) 2002-2004 Chris Danford
* All rights reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -517,7 +520,7 @@ RString ScreenOptionsManageProfiles::GetLocalProfileIDWithFocus() const
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF