Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
efosamark authored and IrneRacoonovich committed Apr 23, 2024
1 parent 717d97f commit 38da220
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/libtesla/include/tesla.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2955,7 +2955,7 @@ namespace tsl {
*/

void setProgressVal(u8 value) {
int i = 0;
size_t i = 0;
for (i = 0; i < stepSizes.size(); ++i) {
// Check if the value falls within the range of the current step
if (value == this->stepSizes[i]) {
Expand Down
6 changes: 1 addition & 5 deletions source/hex_funcs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,7 @@ FILE* openFile(const std::string& filePath) {
return file;
}

void closeFile(FILE* const file) {
fclose(file);
}

size_t findCustOffset(FILE* const file) {
long findCustOffset(FILE* const file) {
const std::vector<std::size_t> dataOffsets = findHexDataOffsetsF(file, "43555354");
if (dataOffsets.empty()) {
log("readHexDataAtOffset: data \"%s\" not found.", "CUST");
Expand Down
4 changes: 2 additions & 2 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ class SubMenu : public tsl::Gui {
~SubMenu() {}

FILE* kipFile = nullptr;
size_t custOffset;
int custOffset;

auto addSliderItem(auto& sliderOption)
{
Expand Down Expand Up @@ -1263,7 +1263,7 @@ class SubMenu : public tsl::Gui {
}

if (kipFile) {
closeFile(kipFile);
fclose(kipFile);
kipFile = nullptr;
}
constexpr int lineHeight = 20; // Adjust the line height as needed
Expand Down

0 comments on commit 38da220

Please sign in to comment.