Skip to content

Commit

Permalink
Remove wrong assertions.
Browse files Browse the repository at this point in the history
These assertions were added in e9c0e22, but they are *not*
correct. A type size of 1 (e.g. `char`) can be encountered, and it is a
valid case that simply does not support any byte swapping.

(Another case had already been fixed in 11e56d6.)
  • Loading branch information
cristian64 committed May 16, 2024
1 parent 8936d78 commit 6929fbe
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
3 changes: 0 additions & 3 deletions Source/DolphinProcess/Linux/LinuxDolphinProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "../../Common/CommonUtils.h"
#include "../../Common/MemoryCommon.h"

#include <cassert>
#include <cstdlib>
#include <cstring>
#include <dirent.h>
Expand Down Expand Up @@ -204,7 +203,6 @@ bool LinuxDolphinProcess::readFromRAM(const u32 offset, char* buffer, const size
break;
}
default:
assert(0 && "Unexpected type size");
break;
}
}
Expand Down Expand Up @@ -272,7 +270,6 @@ bool LinuxDolphinProcess::writeToRAM(const u32 offset, const char* buffer, const
break;
}
default:
assert(0 && "Unexpected type size");
break;
}
}
Expand Down
3 changes: 0 additions & 3 deletions Source/DolphinProcess/Mac/MacDolphinProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "../../Common/CommonUtils.h"
#include "../../Common/MemoryCommon.h"

#include <cassert>
#include <cstdlib>
#include <mach/mach_vm.h>
#include <memory>
Expand Down Expand Up @@ -171,7 +170,6 @@ bool MacDolphinProcess::readFromRAM(const u32 offset, char* buffer, size_t size,
break;
}
default:
assert(0 && "Unexpected type size");
break;
}
}
Expand Down Expand Up @@ -231,7 +229,6 @@ bool MacDolphinProcess::writeToRAM(const u32 offset, const char* buffer, const s
break;
}
default:
assert(0 && "Unexpected type size");
break;
}
}
Expand Down
3 changes: 0 additions & 3 deletions Source/DolphinProcess/Windows/WindowsDolphinProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#ifdef UNICODE
#include <codecvt>
#endif
#include <cassert>
#include <cstdlib>
#include <string>
#include <tlhelp32.h>
Expand Down Expand Up @@ -207,7 +206,6 @@ bool WindowsDolphinProcess::readFromRAM(const u32 offset, char* buffer, const si
break;
}
default:
assert(0 && "Unexpected type size");
break;
}
}
Expand Down Expand Up @@ -268,7 +266,6 @@ bool WindowsDolphinProcess::writeToRAM(const u32 offset, const char* buffer, con
break;
}
default:
assert(0 && "Unexpected type size");
break;
}
}
Expand Down
1 change: 0 additions & 1 deletion Source/MemoryScanner/MemoryScanner.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#pragma once

#include <cassert>
#include <cmath>
#include <cstring>
#include <stack>
Expand Down

0 comments on commit 6929fbe

Please sign in to comment.