1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-27 12:14:26 +01:00

Code cleanup and use same syntax on the entire project

Initial code cleanup

More code cleanup

Cleanup more code

Cleanup Dot11 code

Fix OSX build issue

Cleanup examples

Fix ref and pointer declaration syntax

Fix braces
This commit is contained in:
Matias Fontanini
2016-01-02 08:17:59 -08:00
parent f5a82b1a17
commit d84f10cf08
177 changed files with 13203 additions and 12272 deletions

View File

@@ -34,31 +34,31 @@
using Tins::Memory::OutputMemoryStream;
namespace Tins {
RawPDU::RawPDU(const uint8_t *pload, uint32_t size)
: _payload(pload, pload + size)
{
RawPDU::RawPDU(const uint8_t* pload, uint32_t size)
: payload_(pload, pload + size) {
}
RawPDU::RawPDU(const std::string &data)
: _payload(data.begin(), data.end()) {
RawPDU::RawPDU(const std::string& data)
: payload_(data.begin(), data.end()) {
}
uint32_t RawPDU::header_size() const {
return static_cast<uint32_t>(_payload.size());
return static_cast<uint32_t>(payload_.size());
}
void RawPDU::write_serialization(uint8_t *buffer, uint32_t total_sz, const PDU *) {
void RawPDU::write_serialization(uint8_t* buffer, uint32_t total_sz, const PDU *) {
OutputMemoryStream stream(buffer, total_sz);
stream.write(_payload.begin(), _payload.end());
stream.write(payload_.begin(), payload_.end());
}
void RawPDU::payload(const payload_type &pload) {
_payload = pload;
void RawPDU::payload(const payload_type& pload) {
payload_ = pload;
}
bool RawPDU::matches_response(const uint8_t *ptr, uint32_t total_sz) const {
bool RawPDU::matches_response(const uint8_t* ptr, uint32_t total_sz) const {
return true;
}
}
} // Tins