kernel: Const correctness

This commit is contained in:
IndecisiveTurtle 2024-06-26 18:17:39 +03:00
parent c081663aac
commit c8ed338d5a
4 changed files with 3 additions and 3 deletions

View file

@ -181,7 +181,7 @@ public:
} }
template <typename T> template <typename T>
size_t WriteRaw(void* data, size_t size) const { size_t WriteRaw(const void* data, size_t size) const {
return std::fwrite(data, sizeof(T), size, file); return std::fwrite(data, sizeof(T), size, file);
} }

View file

@ -126,7 +126,7 @@ int PS4_SYSV_ABI posix_close(int d) {
return ORBIS_OK; return ORBIS_OK;
} }
size_t PS4_SYSV_ABI sceKernelWrite(int d, void* buf, size_t nbytes) { size_t PS4_SYSV_ABI sceKernelWrite(int d, const void* buf, size_t nbytes) {
if (d <= 2) { // stdin,stdout,stderr if (d <= 2) { // stdin,stdout,stderr
char* str = strdup((const char*)buf); char* str = strdup((const char*)buf);
if (str[nbytes - 1] == '\n') if (str[nbytes - 1] == '\n')

View file

@ -11,7 +11,6 @@
#include "core/memory.h" #include "core/memory.h"
#include "core/module.h" #include "core/module.h"
#include "core/tls.h" #include "core/tls.h"
#include "core/virtual_memory.h"
namespace Core { namespace Core {

View file

@ -331,6 +331,7 @@ void Translate(IR::Block* block, std::span<const GcnInst> inst_list, Info& info)
case Opcode::IMAGE_SAMPLE_C_LZ: case Opcode::IMAGE_SAMPLE_C_LZ:
case Opcode::IMAGE_SAMPLE_LZ: case Opcode::IMAGE_SAMPLE_LZ:
case Opcode::IMAGE_SAMPLE: case Opcode::IMAGE_SAMPLE:
case Opcode::IMAGE_SAMPLE_L:
translator.IMAGE_SAMPLE(inst); translator.IMAGE_SAMPLE(inst);
break; break;
case Opcode::IMAGE_STORE: case Opcode::IMAGE_STORE: