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 committed by Daniel Gibson
parent 055b80e859
commit 25929447dc
3 changed files with 5 additions and 5 deletions

View file

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

View file

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

View file

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