diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-22 17:02:32 -0500 |
|---|---|---|
| committer | oldmud0 <oldmud0@users.noreply.github.com> | 2020-05-22 17:02:32 -0500 |
| commit | 156a760ebab6839c53f9c613881f0937e814414a (patch) | |
| tree | fd9fafecd25fbd66f0e4f8101f856c8cf68b790e /src/aopacket.cpp | |
| parent | d89a4370a753f6e1da22349866b1b00f638884a6 (diff) | |
Full revert to tag 2.6.2
Due to a countless number of changes made to the core that were not
fully understood, tested, or documented, it was decided to roll
everything back to the last known stable version (2.6.2).
Changes dropped include:
- Witness needed
- Shake
- Frame SFX
- Multiple custom objections
- Multithreaded thumbnail generation
- Looping
- Various translation additions
- "Mirror IC"
- Color in IC log
- An invocation of clang-format
Next time, work together and split your big fork into independently
testable feature branches.
Diffstat (limited to 'src/aopacket.cpp')
| -rw-r--r-- | src/aopacket.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/aopacket.cpp b/src/aopacket.cpp index 6afd39e7..b957efea 100644 --- a/src/aopacket.cpp +++ b/src/aopacket.cpp @@ -8,7 +8,8 @@ AOPacket::AOPacket(QString p_packet_string) m_header = packet_contents.at(0); - for (int n_string = 1; n_string < packet_contents.size() - 1; ++n_string) { + for(int n_string = 1 ; n_string < packet_contents.size() - 1 ; ++n_string) + { m_contents.append(packet_contents.at(n_string)); } } @@ -19,18 +20,23 @@ AOPacket::AOPacket(QString p_header, QStringList &p_contents) m_contents = p_contents; } -AOPacket::~AOPacket() {} +AOPacket::~AOPacket() +{ + +} QString AOPacket::to_string() { QString f_string = m_header; - for (QString i_string : m_contents) { + for (QString i_string : m_contents) + { f_string += ("#" + i_string); } f_string += "#%"; + if (encrypted) return "#" + f_string; else @@ -53,12 +59,10 @@ void AOPacket::decrypt_header(unsigned int p_key) void AOPacket::net_encode() { - for (int n_element = 0; n_element < m_contents.size(); ++n_element) { + for (int n_element = 0 ; n_element < m_contents.size() ; ++n_element) + { QString f_element = m_contents.at(n_element); - f_element.replace("#", "<num>") - .replace("%", "<percent>") - .replace("$", "<dollar>") - .replace("&", "<and>"); + f_element.replace("#", "<num>").replace("%", "<percent>").replace("$", "<dollar>").replace("&", "<and>"); m_contents.removeAt(n_element); m_contents.insert(n_element, f_element); @@ -67,14 +71,13 @@ void AOPacket::net_encode() void AOPacket::net_decode() { - for (int n_element = 0; n_element < m_contents.size(); ++n_element) { + for (int n_element = 0 ; n_element < m_contents.size() ; ++n_element) + { QString f_element = m_contents.at(n_element); - f_element.replace("<num>", "#") - .replace("<percent>", "%") - .replace("<dollar>", "$") - .replace("<and>", "&"); + f_element.replace("<num>", "#").replace("<percent>", "%").replace("<dollar>", "$").replace("<and>", "&"); m_contents.removeAt(n_element); m_contents.insert(n_element, f_element); } } + |
