From 22e1aa5bb4a159d6d66a321f978917614aa36331 Mon Sep 17 00:00:00 2001 From: degasus Date: Tue, 8 Jul 2014 14:29:26 +0200 Subject: mark all local functions as static --- Source/Core/VideoBackends/Software/SWCommandProcessor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoBackends/Software/SWCommandProcessor.cpp') diff --git a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp index d310a5584d..ed8115f1ab 100644 --- a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp +++ b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp @@ -66,7 +66,7 @@ inline u16 ReadLow (u32 _reg) {return (u16)(_reg & 0xFFFF);} inline u16 ReadHigh (u32 _reg) {return (u16)(_reg >> 16);} -void UpdateInterrupts_Wrapper(u64 userdata, int cyclesLate) +static void UpdateInterrupts_Wrapper(u64 userdata, int cyclesLate) { UpdateInterrupts(userdata); } @@ -219,7 +219,7 @@ void UpdateInterruptsFromVideoBackend(u64 userdata) CoreTiming::ScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata); } -void ReadFifo() +static void ReadFifo() { bool canRead = cpreg.readptr != cpreg.writeptr && writePos < (int)maxCommandBufferWrite; bool atBreakpoint = AtBreakpoint(); @@ -256,7 +256,7 @@ void ReadFifo() } } -void SetStatus() +static void SetStatus() { // overflow check if (cpreg.rwdistance > cpreg.hiwatermark) -- cgit v1.2.3 From 6d3f249dcc746cc7845ef88ddb8ce3bcc9221aca Mon Sep 17 00:00:00 2001 From: degasus Date: Tue, 8 Jul 2014 15:58:25 +0200 Subject: mark all local variables as static --- .../Core/VideoBackends/Software/SWCommandProcessor.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Source/Core/VideoBackends/Software/SWCommandProcessor.cpp') diff --git a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp index ed8115f1ab..1a2dcc0cbf 100644 --- a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp +++ b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp @@ -33,14 +33,14 @@ enum // STATE_TO_SAVE // variables -const int commandBufferSize = 1024 * 1024; -const int maxCommandBufferWrite = commandBufferSize - GATHER_PIPE_SIZE; -u8 commandBuffer[commandBufferSize]; -u32 readPos; -u32 writePos; -int et_UpdateInterrupts; -volatile bool interruptSet; -volatile bool interruptWaiting; +static const int commandBufferSize = 1024 * 1024; +static const int maxCommandBufferWrite = commandBufferSize - GATHER_PIPE_SIZE; +static u8 commandBuffer[commandBufferSize]; +static u32 readPos; +static u32 writePos; +static int et_UpdateInterrupts; +static volatile bool interruptSet; +static volatile bool interruptWaiting; CPReg cpreg; // shared between gfx and emulator thread -- cgit v1.2.3 From 81ed17be53e7fed93147dc0d334a6c1d45f4e3c8 Mon Sep 17 00:00:00 2001 From: degasus Date: Tue, 8 Jul 2014 16:49:33 +0200 Subject: avoid the extern keyword in .cpp files --- Source/Core/VideoBackends/Software/SWCommandProcessor.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Core/VideoBackends/Software/SWCommandProcessor.cpp') diff --git a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp index 1a2dcc0cbf..3b80b9ddbf 100644 --- a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp +++ b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp @@ -20,6 +20,8 @@ #include "VideoBackends/Software/SWCommandProcessor.h" #include "VideoBackends/Software/VideoBackend.h" +#include "VideoCommon/DataReader.h" +#include "VideoCommon/Fifo.h" namespace SWCommandProcessor { -- cgit v1.2.3 From 7e79806efcd5c5e41efea89fa385b480ac1882f5 Mon Sep 17 00:00:00 2001 From: degasus Date: Tue, 8 Jul 2014 22:37:58 +0200 Subject: remove unused globals Also change globals into statics which are only used in one file --- Source/Core/VideoBackends/Software/SWCommandProcessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/VideoBackends/Software/SWCommandProcessor.cpp') diff --git a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp index 3b80b9ddbf..4f4790ed72 100644 --- a/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp +++ b/Source/Core/VideoBackends/Software/SWCommandProcessor.cpp @@ -44,7 +44,7 @@ static int et_UpdateInterrupts; static volatile bool interruptSet; static volatile bool interruptWaiting; -CPReg cpreg; // shared between gfx and emulator thread +static CPReg cpreg; // shared between gfx and emulator thread void DoState(PointerWrap &p) { -- cgit v1.2.3