[REFACT] Removed redundant functions

This commit is contained in:
hasherezade
2022-09-12 05:08:34 +02:00
parent 7f17d2f5cc
commit e965ff720b
3 changed files with 9 additions and 38 deletions
+2 -2
View File
@@ -303,7 +303,7 @@ bool PEFile::setHdrSectionsNum(size_t newNum)
bool PEFile::setVirtualSize(bufsize_t newSize)
{
uint64_t size = newSize;
bool canSet = optHdr->setNumValue(OptHdrWrapper::IMAGE_SIZE, 0, size);
bool canSet = optHdr->setNumValue(OptHdrWrapper::IMAGE_SIZE, size);
if (canSet == false) {
Logger::append(Logger::D_ERROR, "Can not change OptHdr!");
return false;
@@ -624,7 +624,7 @@ size_t PEFile::getExportsMap(QMap<offset_t,QString> &entrypoints, Executable::ad
const size_t entriesCnt = exports->getEntriesCount();
if (entriesCnt == 0) return 0;
for(int i = 0; i < entriesCnt; i++) {
for (int i = 0; i < entriesCnt; i++) {
ExportEntryWrapper* entry = dynamic_cast<ExportEntryWrapper*>(exports->getEntryAt(i));
if (!entry) continue;
+2 -1
View File
@@ -3,7 +3,8 @@
using namespace buf_util;
const size_t SECNAME_LEN = 8;
const size_t SectionHdrWrapper::SECNAME_LEN = 8;
size_t SectHdrsWrapper::SECT_COUNT_MAX = 0x2000;
size_t SectHdrsWrapper::SECT_INVALID_INDEX = SIZE_MAX;