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
+2
View File
@@ -3,6 +3,8 @@
#include "RageLog.h"
#include <cstdint>
#include <vector>
Joystick::Joystick() : id( InputDevice_Invalid ),
x_axis( 0 ), y_axis( 0 ), z_axis( 0 ),
+5 -2
View File
@@ -3,6 +3,9 @@
#include "HIDDevice.h"
#include <vector>
struct Joystick
{
InputDevice id;
@@ -42,7 +45,7 @@ public:
/*
* (c) 2005-2006 Steve Checkoway
* 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
@@ -52,7 +55,7 @@ public:
* 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
+2
View File
@@ -2,6 +2,8 @@
#include "KeyboardDevice.h"
#include <cstddef>
#include <vector>
using namespace __gnu_cxx;
+5 -2
View File
@@ -3,6 +3,9 @@
#include "HIDDevice.h"
#include <vector>
class KeyboardDevice : public HIDDevice
{
private:
@@ -25,7 +28,7 @@ public:
/*
* (c) 2005-2006 Steve Checkoway
* 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
@@ -35,7 +38,7 @@ public:
* 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
+3
View File
@@ -1,6 +1,9 @@
#include "global.h"
#include "MouseDevice.h"
#include <vector>
Mouse::Mouse() : id( InputDevice_Invalid ),
x_axis( 0 ), y_axis( 0 ), z_axis( 0 ),
x_min( 0 ), x_max( 0 ), y_min( 0 ),
+5 -2
View File
@@ -4,6 +4,9 @@
#include "HIDDevice.h"
#include "InputFilter.h"
#include <vector>
struct Mouse
{
InputDevice id;
@@ -39,7 +42,7 @@ public:
/*
* (c) 2011 AJ Kelly
* 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
@@ -49,7 +52,7 @@ public:
* 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
+2
View File
@@ -2,6 +2,8 @@
#include "PumpDevice.h"
#include <cstdint>
#include <vector>
void PumpDevice::Open()
{
+5 -2
View File
@@ -3,6 +3,9 @@
#include "HIDDevice.h"
#include <vector>
class PumpDevice : public HIDDevice
{
private:
@@ -26,7 +29,7 @@ public:
/*
* (c) 2006 Steve Checkoway
* 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
@@ -36,7 +39,7 @@ public:
* 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
+8 -7
View File
@@ -1,13 +1,6 @@
#define __USE_GNU
#include "global.h"
#include <cstdio>
#include <cstring>
#include <cerrno>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/select.h>
#include "Backtrace.h"
#include "BacktraceNames.h"
@@ -24,6 +17,14 @@
#include "ver.h"
#include <cstdio>
#include <cstring>
#include <cerrno>
#include <vector>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/select.h>
bool child_read( int fd, void *p, int size );
const char *g_pCrashHandlerArgv0 = nullptr;
+7 -5
View File
@@ -3,17 +3,19 @@
#include "RageLog.h"
#include "SignalHandler.h"
#include "GetSysInfo.h"
#include <memory>
#if defined(HAVE_LIBPTHREAD)
#include "archutils/Common/PthreadHelpers.h"
#endif
#include <cerrno>
#include <memory>
#include <vector>
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#include <sys/mman.h>
#include <cerrno>
#if defined(MACOSX)
extern "C" int sigaltstack(const stack_t * __restrict, stack_t * __restrict);
@@ -175,7 +177,7 @@ void SignalHandler::OnClose( handler h )
p = nullptr; /* no SA_ONSTACK */
}
}
struct sigaction sa;
sa.sa_flags = 0;
@@ -200,7 +202,7 @@ void SignalHandler::OnClose( handler h )
/*
* (c) 2003-2004 Glenn Maynard
* 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
@@ -210,7 +212,7 @@ void SignalHandler::OnClose( handler h )
* 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
+5 -3
View File
@@ -2,8 +2,10 @@
#define SIGNAL_HANDLER_H
#include <csignal>
#include <vector>
#include <ucontext.h>
class SaveSignals
{
std::vector<struct sigaction> old_handlers;
@@ -25,7 +27,7 @@ namespace SignalHandler
/*
* (c) 2003-2004 Glenn Maynard
* 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
@@ -35,7 +37,7 @@ namespace SignalHandler
* 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
+14 -13
View File
@@ -2,19 +2,6 @@
#include "CrashHandlerInternal.h"
#include "Crash.h"
#include <cerrno>
#include <cstddef>
#include <cstdint>
#include <windows.h>
#include <commctrl.h>
#include "archutils/Win32/ddk/dbghelp.h"
#include <io.h>
#if defined(HAVE_FCNTL_H)
#include <fcntl.h>
#endif
#include <shellapi.h>
#include "arch/ArchHooks/ArchHooks.h"
#include "archutils/Win32/WindowsResources.h"
#include "archutils/Win32/DialogUtil.h"
@@ -32,6 +19,20 @@
#include "RageFileDriverDeflate.h"
#include "ver.h"
#include <cerrno>
#include <cstddef>
#include <cstdint>
#include <vector>
#include <windows.h>
#include <commctrl.h>
#include "archutils/Win32/ddk/dbghelp.h"
#include <io.h>
#if defined(HAVE_FCNTL_H)
#include <fcntl.h>
#endif
#include <shellapi.h>
#pragma comment(lib, "dbghelp.lib")
// XXX: What happens when we *don't* have version info? Does that ever actually happen?
+4
View File
@@ -4,9 +4,13 @@
#include "RageUtil.h"
#include "VideoDriverInfo.h"
#include "RegistryAccess.h"
#include <vector>
#include <windows.h>
#include <mmsystem.h>
static void LogVideoDriverInfo( VideoDriverInfo info )
{
LOG->Info( "Video driver: %s [%s]", info.sDescription.c_str(), info.sProvider.c_str() );
+2
View File
@@ -5,8 +5,10 @@
#include "archutils/Win32/ErrorStrings.h"
#include <cstddef>
#include <vector>
#include <windows.h>
/* Given "HKEY_LOCAL_MACHINE\hardware\foo", return "hardware\foo", and place
* the HKEY_LOCAL_MACHINE constant in key. */
static bool GetRegKeyType( const RString &sIn, RString &sOut, HKEY &key )
+5 -2
View File
@@ -3,6 +3,9 @@
#ifndef REGISTRY_ACCESS_H
#define REGISTRY_ACCESS_H
#include <vector>
namespace RegistryAccess
{
bool GetRegValue( const RString &sKey, const RString &sName, RString &val );
@@ -23,7 +26,7 @@ namespace RegistryAccess
/*
* (c) 2004 Glenn Maynard
* 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
@@ -33,7 +36,7 @@ namespace RegistryAccess
* 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
+8 -5
View File
@@ -4,8 +4,8 @@
#include "RageUtil.h"
#include "archutils/Win32/ErrorStrings.h"
#pragma comment(lib, "setupapi.lib")
#pragma comment(lib, "hid.lib")
#pragma comment(lib, "setupapi.lib")
#pragma comment(lib, "hid.lib")
extern "C" {
#include "archutils/Win32/ddk/setupapi.h"
@@ -13,6 +13,9 @@ extern "C" {
#include "archutils/Win32/ddk/hidsdi.h"
}
#include <vector>
static RString GetUSBDevicePath( int iNum )
{
GUID guid;
@@ -38,7 +41,7 @@ static RString GetUSBDevicePath( int iNum )
RString sRet;
if( SetupDiGetDeviceInterfaceDetail(DeviceInfo, &DeviceInterface,
DeviceDetail, iSize, &iSize, nullptr) )
DeviceDetail, iSize, &iSize, nullptr) )
sRet = DeviceDetail->DevicePath;
free( DeviceDetail );
@@ -221,7 +224,7 @@ bool WindowsFileIO::IsOpen() const
/*
* (c) 2002-2005 Glenn Maynard
* 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
@@ -231,7 +234,7 @@ bool WindowsFileIO::IsOpen() 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
+10 -7
View File
@@ -3,8 +3,11 @@
#include "RageUtil.h"
#include "RageLog.h"
#include "RegistryAccess.h"
#include <vector>
#include <windows.h>
// this will not work on 95 and NT because of EnumDisplayDevices
RString GetPrimaryVideoName()
{
@@ -13,8 +16,8 @@ RString GetPrimaryVideoName()
HINSTANCE hInstUser32;
hInstUser32 = LoadLibrary( "User32.DLL" );
if( !hInstUser32 )
return RString();
if( !hInstUser32 )
return RString();
// VC6 don't have a stub to static link with, so link dynamically.
EnumDisplayDevices = (pfnEnumDisplayDevices)GetProcAddress(hInstUser32,"EnumDisplayDevicesA");
@@ -23,7 +26,7 @@ RString GetPrimaryVideoName()
FreeLibrary(hInstUser32);
return RString();
}
RString sPrimaryDeviceName;
for( int i=0; true; ++i )
{
@@ -49,7 +52,7 @@ RString GetPrimaryVideoDriverName()
RString sPrimaryDeviceName = GetPrimaryVideoName();
if( sPrimaryDeviceName != "" )
return sPrimaryDeviceName;
LOG->Warn("GetPrimaryVideoName failed; renderer selection may be wrong");
VideoDriverInfo info;
@@ -68,7 +71,7 @@ bool GetVideoDriverInfo( int iCardno, VideoDriverInfo &info )
{
bInitialized = true;
const RString sTopKey =
const RString sTopKey =
"HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}";
RegistryAccess::GetRegSubKeys( sTopKey, lst, ".*", false );
@@ -118,7 +121,7 @@ bool GetVideoDriverInfo( int iCardno, VideoDriverInfo &info )
/*
* (c) 2002-2004 Chris Danford, Glenn Maynard
* 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
@@ -128,7 +131,7 @@ bool GetVideoDriverInfo( int iCardno, VideoDriverInfo &info )
* 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