aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/programloader.cpp
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-09-02 15:34:07 +0200
committerKarel Kočí <cynerd@email.cz>2017-09-02 15:34:07 +0200
commit375607d9969896c894fa2642ce4a0b8b519a2adb (patch)
treecb947a843d85f1cd278da15cff432c849986166c /qtmips_machine/programloader.cpp
parent82884b3ef726889f837542d2b5e98e2cd8246c00 (diff)
downloadqtmips-375607d9969896c894fa2642ce4a0b8b519a2adb.tar.gz
qtmips-375607d9969896c894fa2642ce4a0b8b519a2adb.tar.bz2
qtmips-375607d9969896c894fa2642ce4a0b8b519a2adb.zip
Use QString and QVector instead of std ones and more
Diffstat (limited to 'qtmips_machine/programloader.cpp')
-rw-r--r--qtmips_machine/programloader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qtmips_machine/programloader.cpp b/qtmips_machine/programloader.cpp
index 0b0e294..6eefa6c 100644
--- a/qtmips_machine/programloader.cpp
+++ b/qtmips_machine/programloader.cpp
@@ -69,13 +69,13 @@ std::uint32_t ProgramLoader::get_address(size_t sec) {
return this->phdrs[this->map[sec]].p_vaddr;
}
-std::vector<std::uint8_t> ProgramLoader::get_data(size_t sec) {
+QVector<std::uint8_t> ProgramLoader::get_data(size_t sec) {
SANITY_ASSERT(sec > this->get_nsec(), "Requesting too big section");
- std::vector<std::uint8_t> d;
+ QVector<std::uint8_t> d;
char *f = elf_rawfile(this->elf, NULL);
size_t phdrs_i = this->map[sec];
for (unsigned i = 0; i < this->phdrs[phdrs_i].p_filesz; i++) {
- d.push_back((std::uint8_t) f[this->phdrs[phdrs_i].p_offset + i]);
+ d << (std::uint8_t) f[this->phdrs[phdrs_i].p_offset + i];
}
return d;
}