mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-30 23:15:16 -04:00
Updated code to support newer Qt versions (#237)
This commit is contained in:
parent
d1e47539fc
commit
34c8ad8dcc
28 changed files with 358 additions and 94 deletions
|
@ -45,14 +45,14 @@ public:
|
|||
UByteArray toUpper() { std::basic_string<char> s = d; std::transform(s.begin(), s.end(), s.begin(), ::toupper); return UByteArray(s); }
|
||||
uint32_t toUInt(bool* ok = NULL, const uint8_t base = 10) { return (uint32_t)strtoul(d.c_str(), NULL, base); }
|
||||
|
||||
int32_t size() const { return d.size(); }
|
||||
int32_t count(char ch) const { return std::count(d.begin(), d.end(), ch); }
|
||||
int32_t size() const { return (int32_t)d.size(); }
|
||||
int32_t count(char ch) const { return (int32_t)std::count(d.begin(), d.end(), ch); }
|
||||
char at(uint32_t i) const { return d.at(i); }
|
||||
char operator[](uint32_t i) const { return d[i]; }
|
||||
char& operator[](uint32_t i) { return d[i]; }
|
||||
|
||||
bool startsWith(const UByteArray & ba) const { return 0 == d.find(ba.d, 0); }
|
||||
int indexOf(const UByteArray & ba, int from = 0) const { return d.find(ba.d, from); }
|
||||
int indexOf(const UByteArray & ba, int from = 0) const { return (int)d.find(ba.d, from); }
|
||||
int lastIndexOf(const UByteArray & ba, int from = 0) const {
|
||||
size_t old_index = d.npos;
|
||||
size_t index = d.find(ba.d, from);
|
||||
|
@ -60,7 +60,7 @@ public:
|
|||
old_index = index;
|
||||
index = d.find(ba.d, index + 1);
|
||||
}
|
||||
return old_index;
|
||||
return (int)old_index;
|
||||
}
|
||||
|
||||
UByteArray left(int32_t len) const { return d.substr(0, len); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue