mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 01:25:41 +08:00
Merge branch 'master' into mqtt
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018,2023 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2018,2023,2025 by Jonathan Naylor G4KLX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -31,14 +31,14 @@ const unsigned char BIT_MASK_TABLE[] = { 0x80U, 0x40U, 0x20U, 0x10U, 0x08U, 0x04
|
||||
#define READ_BIT1(p,i) (p[(i)>>3] & BIT_MASK_TABLE[(i)&7])
|
||||
|
||||
CNXDNLayer3::CNXDNLayer3(const CNXDNLayer3& layer3) :
|
||||
m_data(NULL)
|
||||
m_data(nullptr)
|
||||
{
|
||||
m_data = new unsigned char[22U];
|
||||
::memcpy(m_data, layer3.m_data, 22U);
|
||||
}
|
||||
|
||||
CNXDNLayer3::CNXDNLayer3() :
|
||||
m_data(NULL)
|
||||
m_data(nullptr)
|
||||
{
|
||||
m_data = new unsigned char[22U];
|
||||
::memset(m_data, 0x00U, 22U);
|
||||
@@ -51,7 +51,7 @@ CNXDNLayer3::~CNXDNLayer3()
|
||||
|
||||
void CNXDNLayer3::decode(const unsigned char* bytes, unsigned int length, unsigned int offset)
|
||||
{
|
||||
assert(bytes != NULL);
|
||||
assert(bytes != nullptr);
|
||||
|
||||
for (unsigned int i = 0U; i < length; i++, offset++) {
|
||||
bool b = READ_BIT1(bytes, i);
|
||||
@@ -61,7 +61,7 @@ void CNXDNLayer3::decode(const unsigned char* bytes, unsigned int length, unsign
|
||||
|
||||
void CNXDNLayer3::encode(unsigned char* bytes, unsigned int length, unsigned int offset)
|
||||
{
|
||||
assert(bytes != NULL);
|
||||
assert(bytes != nullptr);
|
||||
|
||||
for (unsigned int i = 0U; i < length; i++, offset++) {
|
||||
bool b = READ_BIT1(m_data, offset);
|
||||
|
||||
Reference in New Issue
Block a user