mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
First part of the const changes etc
This commit is contained in:
parent
9d48e51205
commit
2ba4eaf3dd
@ -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])
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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_)) {
|
||||
|
@ -23,7 +23,9 @@ public:
|
||||
void Refresh() {
|
||||
HandlePath();
|
||||
}
|
||||
bool IsListingReady();
|
||||
bool IsListingReady() const {
|
||||
return ready_;
|
||||
}
|
||||
bool GetListing(std::vector<File::FileInfo> &fileInfo, const char *filter = nullptr, bool *cancel = nullptr);
|
||||
|
||||
bool CanNavigateUp();
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user