diff --git a/Common/Arm64Emitter.cpp b/Common/Arm64Emitter.cpp index 462ddc7346..56ebb11baf 100644 --- a/Common/Arm64Emitter.cpp +++ b/Common/Arm64Emitter.cpp @@ -1934,7 +1934,7 @@ inline int64_t abs64(int64_t x) { return x >= 0 ? x : -x; } -int Count(bool part[4]) { +static int Count(const bool part[4]) { int cnt = 0; for (int i = 0; i < 4; i++) { if (part[i]) diff --git a/Common/ArmEmitter.h b/Common/ArmEmitter.h index f1cf4dd224..7570e44479 100644 --- a/Common/ArmEmitter.h +++ b/Common/ArmEmitter.h @@ -456,7 +456,7 @@ public: void AddNewLit(u32 val); bool TrySetValue_TwoOp(ARMReg reg, u32 val); - CCFlags GetCC() { return CCFlags(condition >> 28); } + CCFlags GetCC() const { return CCFlags(condition >> 28); } void SetCC(CCFlags cond = CC_AL); // Special purpose instructions diff --git a/Common/Buffer.h b/Common/Buffer.h index 4d63a8e5ad..aec1727383 100644 --- a/Common/Buffer.h +++ b/Common/Buffer.h @@ -74,7 +74,7 @@ public: size_t size() const { return data_.size(); } bool empty() const { return size() == 0; } void clear() { data_.resize(0); } - bool IsVoid() { return void_; } + bool IsVoid() const { return void_; } protected: // TODO: Find a better internal representation, like a cord. diff --git a/Common/Crypto/md5.cpp b/Common/Crypto/md5.cpp index cce49809dc..595db5e5c6 100644 --- a/Common/Crypto/md5.cpp +++ b/Common/Crypto/md5.cpp @@ -73,7 +73,7 @@ void ppsspp_md5_starts( md5_context *ctx ) ctx->state[3] = 0x10325476; } -static void ppsspp_md5_process( md5_context *ctx, unsigned char data[64] ) +static void ppsspp_md5_process( md5_context *ctx, const unsigned char data[64] ) { unsigned long X[16], A, B, C, D; diff --git a/Common/Crypto/sha1.cpp b/Common/Crypto/sha1.cpp index 05deccc97f..e7011aebd4 100644 --- a/Common/Crypto/sha1.cpp +++ b/Common/Crypto/sha1.cpp @@ -74,7 +74,7 @@ void sha1_starts( sha1_context *ctx ) ctx->state[4] = 0xC3D2E1F0; } -static void sha1_process( sha1_context *ctx, unsigned char data[64] ) +static void sha1_process( sha1_context *ctx, const unsigned char data[64] ) { unsigned long temp, W[16], A, B, C, D, E; diff --git a/Common/File/PathBrowser.cpp b/Common/File/PathBrowser.cpp index ea5bb92e88..202b3cd25d 100644 --- a/Common/File/PathBrowser.cpp +++ b/Common/File/PathBrowser.cpp @@ -204,10 +204,6 @@ void PathBrowser::ResetPending() { pendingPath_.clear(); } -bool PathBrowser::IsListingReady() { - return ready_; -} - std::string PathBrowser::GetFriendlyPath() const { // Show relative to memstick root if there. if (path_.StartsWith(aliasMatch_)) { diff --git a/Common/File/PathBrowser.h b/Common/File/PathBrowser.h index 38733c6cae..ca98c6b4a8 100644 --- a/Common/File/PathBrowser.h +++ b/Common/File/PathBrowser.h @@ -23,7 +23,9 @@ public: void Refresh() { HandlePath(); } - bool IsListingReady(); + bool IsListingReady() const { + return ready_; + } bool GetListing(std::vector &fileInfo, const char *filter = nullptr, bool *cancel = nullptr); bool CanNavigateUp(); diff --git a/Common/GPU/OpenGL/GLMemory.h b/Common/GPU/OpenGL/GLMemory.h index c6892f6017..fb1b27508f 100644 --- a/Common/GPU/OpenGL/GLMemory.h +++ b/Common/GPU/OpenGL/GLMemory.h @@ -86,7 +86,6 @@ public: // Utility for users of this class, not used internally. enum { INVALID_OFFSET = 0xFFFFFFFF }; -private: // Needs context in case of defragment. void Begin() { buf_ = 0; @@ -105,7 +104,6 @@ private: Unmap(); } -public: void Map(); void Unmap(); diff --git a/Common/GPU/OpenGL/GLRenderManager.h b/Common/GPU/OpenGL/GLRenderManager.h index f6e0132032..0627a854cb 100644 --- a/Common/GPU/OpenGL/GLRenderManager.h +++ b/Common/GPU/OpenGL/GLRenderManager.h @@ -376,14 +376,6 @@ public: deleter_.pushBuffers.push_back(pushbuffer); } - void BeginPushBuffer(GLPushBuffer *pushbuffer) { - pushbuffer->Begin(); - } - - void EndPushBuffer(GLPushBuffer *pushbuffer) { - pushbuffer->End(); - } - bool IsInRenderPass() const { return curRenderStep_ && curRenderStep_->stepType == GLRStepType::RENDER; } diff --git a/Common/GPU/OpenGL/thin3d_gl.cpp b/Common/GPU/OpenGL/thin3d_gl.cpp index 6a0237a012..9eb9d402fd 100644 --- a/Common/GPU/OpenGL/thin3d_gl.cpp +++ b/Common/GPU/OpenGL/thin3d_gl.cpp @@ -799,12 +799,12 @@ OpenGLContext::~OpenGLContext() { void OpenGLContext::BeginFrame(DebugFlags debugFlags) { renderManager_.BeginFrame(debugFlags & DebugFlags::PROFILE_TIMESTAMPS); FrameData &frameData = frameData_[renderManager_.GetCurFrame()]; - renderManager_.BeginPushBuffer(frameData.push); + frameData.push->Begin(); } void OpenGLContext::EndFrame() { FrameData &frameData = frameData_[renderManager_.GetCurFrame()]; - renderManager_.EndPushBuffer(frameData.push); // upload the data! + frameData.push->End(); // upload the data! renderManager_.Finish(); Invalidate(InvalidationFlags::CACHED_RENDER_STATE); } diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index e2161572d3..8fc2f75d77 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -150,16 +150,16 @@ void DrawEngineGLES::ClearInputLayoutMap() { void DrawEngineGLES::BeginFrame() { FrameData &frameData = frameData_[render_->GetCurFrame()]; - render_->BeginPushBuffer(frameData.pushIndex); - render_->BeginPushBuffer(frameData.pushVertex); + frameData.pushIndex->Begin(); + frameData.pushVertex->Begin(); lastRenderStepId_ = -1; } void DrawEngineGLES::EndFrame() { FrameData &frameData = frameData_[render_->GetCurFrame()]; - render_->EndPushBuffer(frameData.pushIndex); - render_->EndPushBuffer(frameData.pushVertex); + frameData.pushIndex->End(); + frameData.pushVertex->End(); tessDataTransferGLES->EndFrame(); }