Change return type of [Sys_]GetProcessorId to int

Fixes compile error: invalid conversion from 'int' to 'cpuid_t'
This commit is contained in:
dhewg 2011-12-12 23:24:06 +01:00
parent 8023bc5d56
commit 18762483e6
12 changed files with 18 additions and 18 deletions

View file

@ -211,7 +211,7 @@ void idSysLocal::DebugVPrintf( const char *fmt, va_list arg ) {}
double idSysLocal::GetClockTicks( void ) { return 0.0; }
double idSysLocal::ClockTicksPerSecond( void ) { return 1.0; }
cpuid_t idSysLocal::GetProcessorId( void ) { return (cpuid_t)0; }
int idSysLocal::GetProcessorId( void ) { return 0; }
const char * idSysLocal::GetProcessorString( void ) { return ""; }
const char * idSysLocal::FPU_GetState( void ) { return ""; }
bool idSysLocal::FPU_StackIsEmpty( void ) { return true; }

View file

@ -2732,7 +2732,7 @@ idCommonLocal::SetMachineSpec
=================
*/
void idCommonLocal::SetMachineSpec( void ) {
cpuid_t cpu = Sys_GetProcessorId();
int cpu = Sys_GetProcessorId();
double ghz = Sys_ClockTicksPerSecond() * 0.000000001f;
int vidRam = Sys_GetVideoRam();
int sysRam = Sys_GetSystemRam();

View file

@ -61,7 +61,7 @@ idSIMD::InitProcessor
============
*/
void idSIMD::InitProcessor( const char *module, bool forceGeneric ) {
cpuid_t cpuid;
int cpuid;
idSIMDProcessor *newProcessor;
cpuid = idLib::sys->GetProcessorId();
@ -4105,7 +4105,7 @@ void idSIMD::Test_f( const idCmdArgs &args ) {
p_generic = generic;
if ( idStr::Length( args.Argv( 1 ) ) != 0 ) {
cpuid_t cpuid = idLib::sys->GetProcessorId();
int cpuid = idLib::sys->GetProcessorId();
idStr argString = args.Args();
argString.Replace( " ", "" );

View file

@ -97,7 +97,7 @@ class idSIMDProcessor {
public:
idSIMDProcessor( void ) { cpuid = CPUID_NONE; }
cpuid_t cpuid;
int cpuid;
virtual const char * VPCALL GetName( void ) const = 0;

View file

@ -208,7 +208,7 @@ void Sys_Shutdown( void ) {
Sys_GetProcessorId
===============
*/
cpuid_t Sys_GetProcessorId( void ) {
int Sys_GetProcessorId( void ) {
return CPUID_GENERIC;
}

View file

@ -466,8 +466,8 @@ void Sys_Shutdown( void ) {
Sys_GetProcessorId
===============
*/
cpuid_t Sys_GetProcessorId( void ) {
cpuid_t cpuid = CPUID_GENERIC;
int Sys_GetProcessorId( void ) {
int cpuid = CPUID_GENERIC;
#if defined(__ppc__)
cpuid |= CPUID_ALTIVEC;
#elif defined(__i386__)

View file

@ -60,7 +60,7 @@ double idSysLocal::ClockTicksPerSecond( void ) {
return Sys_ClockTicksPerSecond();
}
cpuid_t idSysLocal::GetProcessorId( void ) {
int idSysLocal::GetProcessorId( void ) {
return Sys_GetProcessorId();
}

View file

@ -44,7 +44,7 @@ public:
virtual double GetClockTicks( void );
virtual double ClockTicksPerSecond( void );
virtual cpuid_t GetProcessorId( void );
virtual int GetProcessorId( void );
virtual const char * GetProcessorString( void );
virtual const char * FPU_GetState( void );
virtual bool FPU_StackIsEmpty( void );

View file

@ -323,7 +323,7 @@ double Sys_GetClockTicks( void );
double Sys_ClockTicksPerSecond( void );
// returns a selection of the CPUID_* flags
cpuid_t Sys_GetProcessorId( void );
int Sys_GetProcessorId( void );
const char * Sys_GetProcessorString( void );
// returns true if the FPU stack is empty
@ -593,7 +593,7 @@ public:
virtual double GetClockTicks( void ) = 0;
virtual double ClockTicksPerSecond( void ) = 0;
virtual cpuid_t GetProcessorId( void ) = 0;
virtual int GetProcessorId( void ) = 0;
virtual const char * GetProcessorString( void ) = 0;
virtual const char * FPU_GetState( void ) = 0;
virtual bool FPU_StackIsEmpty( void ) = 0;

View file

@ -531,7 +531,7 @@ static bool HasDAZ( void ) {
Sys_GetCPUId
================
*/
cpuid_t Sys_GetCPUId( void ) {
int Sys_GetCPUId( void ) {
int flags;
// verify we're at least a Pentium or 486 with CPUID support
@ -586,7 +586,7 @@ cpuid_t Sys_GetCPUId( void ) {
flags |= CPUID_DAZ;
}
return (cpuid_t)flags;
return flags;
}

View file

@ -70,7 +70,7 @@ char *Sys_GetCurrentUser( void );
void Win_SetErrorText( const char *text );
cpuid_t Sys_GetCPUId( void );
int Sys_GetCPUId( void );
int MapKey (int key);
@ -108,7 +108,7 @@ typedef struct {
OSVERSIONINFOEX osversion;
cpuid_t cpuid;
int cpuid;
// when we get a windows message, we store the time off so keyboard processing
// can know the exact time of an event (not really needed now that we use async direct input)

View file

@ -1114,7 +1114,7 @@ void Sys_Init( void ) {
common->Printf( "WARNING: unknown sys_cpustring '%s'\n", win32.sys_cpustring.GetString() );
id = CPUID_GENERIC;
}
win32.cpuid = (cpuid_t) id;
win32.cpuid = id;
}
common->Printf( "%s\n", win32.sys_cpustring.GetString() );
@ -1136,7 +1136,7 @@ void Sys_Shutdown( void ) {
Sys_GetProcessorId
================
*/
cpuid_t Sys_GetProcessorId( void ) {
int Sys_GetProcessorId( void ) {
return win32.cpuid;
}