diff --git a/CMakeLists.txt b/CMakeLists.txt index d694a79..c955081 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,7 +115,7 @@ if(WIN32) endif() # Package Config -set(CPACK_PACKAGE_NAME "SNES Emulator") +set(CPACK_PACKAGE_NAME "BreadedSNES") set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) set(CPACK_PACKAGE_DESCRIPTION "Cross-platform SNES Emulator") diff --git a/src/bus.cpp b/src/bus.cpp index 8014d3f..4539920 100644 --- a/src/bus.cpp +++ b/src/bus.cpp @@ -13,8 +13,7 @@ uint8_t Bus::Read(uint32_t address) { return wram[address - 0x7E0000]; } else if (address >= 0x800000 && cartridge) { // ROM access - uint32_t rom_addr = address & 0x7FFFFF; - if (rom_addr < cartridge->size()) { + if (const uint32_t rom_addr = address & 0x7FFFFF; rom_addr < cartridge->size()) { return (*cartridge)[rom_addr]; } } diff --git a/src/main.cpp b/src/main.cpp index 90d6931..40711c2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,7 +12,7 @@ class PPU; class APU; class Bus; -int main(int argc, char* argv[]) { +int main(const int argc, char* argv[]) { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) { std::cout << "SDL could not initialize! SDL_Error: " << SDL_GetError() << std::endl; return -1; @@ -22,7 +22,7 @@ int main(int argc, char* argv[]) { "BreadedSNES", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, - 256, 224, // SNES output resolution + 256, 224, // SNES output res SDL_WINDOW_SHOWN ); diff --git a/src/system.cpp b/src/system.cpp index bb7bed9..940addc 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -29,7 +29,7 @@ bool System::LoadROM(const std::string& filename) { } file.seekg(0, std::ios::end); - size_t size = file.tellg(); + const size_t size = file.tellg(); file.seekg(0, std::ios::beg); cartridge_data.resize(size);