From 25929447dc6ee10ae8f4103e64febd45f5496116 Mon Sep 17 00:00:00 2001 From: dhewg Date: Mon, 12 Dec 2011 23:24:06 +0100 Subject: [PATCH] Change return type of [Sys_]GetProcessorId to int Fixes compile error: invalid conversion from 'int' to 'cpuid_t' --- idlib/math/Simd.cpp | 4 ++-- idlib/math/Simd.h | 2 +- sys/sys_public.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/idlib/math/Simd.cpp b/idlib/math/Simd.cpp index 43e852f..17aa543 100644 --- a/idlib/math/Simd.cpp +++ b/idlib/math/Simd.cpp @@ -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( " ", "" ); diff --git a/idlib/math/Simd.h b/idlib/math/Simd.h index 309c364..10699f9 100644 --- a/idlib/math/Simd.h +++ b/idlib/math/Simd.h @@ -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; diff --git a/sys/sys_public.h b/sys/sys_public.h index 91bec3e..bc73597 100644 --- a/sys/sys_public.h +++ b/sys/sys_public.h @@ -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;