Decouple <cstddef>

This commit is contained in:
Martin Natano
2023-04-20 11:21:29 +02:00
parent 093675cdc3
commit 78fb2e9fc3
171 changed files with 2012 additions and 1786 deletions
+16 -14
View File
@@ -20,6 +20,8 @@
#include "SpecialFiles.h"
#include "NotesWriterSM.h"
#include <cstddef>
AutoScreenMessage( SM_BackFromRename );
AutoScreenMessage( SM_BackFromDelete );
AutoScreenMessage( SM_BackFromContextMenu );
@@ -67,7 +69,7 @@ void ScreenOptionsManageEditSteps::BeginScreen()
std::vector<OptionRowHandler*> vHands;
int iIndex = 0;
{
vHands.push_back( OptionRowHandlerUtil::MakeNull() );
OptionRowDefinition &def = vHands.back()->m_Def;
@@ -86,7 +88,7 @@ void ScreenOptionsManageEditSteps::BeginScreen()
{
vHands.push_back( OptionRowHandlerUtil::MakeNull() );
OptionRowDefinition &def = vHands.back()->m_Def;
Song *pSong = s->m_pSong;
def.m_sName = pSong->GetTranslitFullTitle() + " - " + s->GetDescription();
@@ -103,7 +105,7 @@ void ScreenOptionsManageEditSteps::BeginScreen()
ScreenOptions::InitMenu( vHands );
ScreenOptions::BeginScreen();
// select the last chosen course
if( GAMESTATE->m_pCurSteps[PLAYER_1] )
{
@@ -199,11 +201,11 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM )
break;
case StepsEditAction_Rename:
{
ScreenTextEntry::TextEntry(
SM_BackFromRename,
ENTER_NAME_FOR_STEPS,
GAMESTATE->m_pCurSteps[PLAYER_1]->GetDescription(),
MAX_STEPS_DESCRIPTION_LENGTH,
ScreenTextEntry::TextEntry(
SM_BackFromRename,
ENTER_NAME_FOR_STEPS,
GAMESTATE->m_pCurSteps[PLAYER_1]->GetDescription(),
MAX_STEPS_DESCRIPTION_LENGTH,
SongUtil::ValidateCurrentEditStepsDescription );
}
break;
@@ -226,12 +228,12 @@ void ScreenOptionsManageEditSteps::HandleScreenMessage( const ScreenMessage SM )
ScreenOptions::HandleScreenMessage( SM );
}
void ScreenOptionsManageEditSteps::AfterChangeRow( PlayerNumber pn )
{
Steps *pSteps = GetStepsWithFocus();
Song *pSong = pSteps ? pSteps->m_pSong : nullptr;
GAMESTATE->m_pCurSong.Set( pSong );
GAMESTATE->m_pCurSteps[PLAYER_1].Set( pSteps );
@@ -251,7 +253,7 @@ void ScreenOptionsManageEditSteps::ProcessMenuStart( const InputEventPlus & )
{
std::vector<Steps*> v;
SONGMAN->GetStepsLoadedFromProfile( v, ProfileSlot_Machine );
if( v.size() >= size_t(MAX_EDIT_STEPS_PER_PROFILE) )
if( v.size() >= std::size_t(MAX_EDIT_STEPS_PER_PROFILE) )
{
RString s = ssprintf( YOU_HAVE_MAX_STEP_EDITS.GetValue()+"\n\n"+YOU_MUST_DELETE.GetValue(), MAX_EDIT_STEPS_PER_PROFILE );
ScreenPrompt::Prompt( SM_None, s );
@@ -297,7 +299,7 @@ Steps *ScreenOptionsManageEditSteps::GetStepsWithFocus() const
return nullptr;
else if( m_pRows[iCurRow]->GetRowType() == OptionRow::RowType_Exit )
return nullptr;
// a Steps
int iStepsIndex = iCurRow - 1;
return m_vpSteps[iStepsIndex];
@@ -306,7 +308,7 @@ Steps *ScreenOptionsManageEditSteps::GetStepsWithFocus() const
/*
* (c) 2002-2005 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
@@ -316,7 +318,7 @@ Steps *ScreenOptionsManageEditSteps::GetStepsWithFocus() 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