Skip to content

Commit

Permalink
Add some missing asserts.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed Apr 18, 2016
1 parent b5a7ed8 commit 2e84ab8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions HD44780.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ m_dmr(false)
{
assert(rows > 1U);
assert(cols > 15U);
assert(callsign != NULL);
}

CHD44780::~CHD44780()
Expand Down Expand Up @@ -212,6 +213,7 @@ void CHD44780::clearDStar()
void CHD44780::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
{
assert(src != NULL);
assert(dst != NULL);
assert(type != NULL);

if (!m_dmr) {
Expand Down
2 changes: 2 additions & 0 deletions Nextion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ m_serial(port, SERIAL_9600),
m_brightness(brightness),
m_mode(MODE_IDLE)
{
assert(callsign != NULL);
assert(brightness >= 0U && brightness <= 100U);
}

Expand Down Expand Up @@ -127,6 +128,7 @@ void CNextion::clearDStar()
void CNextion::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
{
assert(src != NULL);
assert(dst != NULL);
assert(type != NULL);

if (m_mode != MODE_DMR) {
Expand Down
2 changes: 2 additions & 0 deletions TFTSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ m_serial(port, SERIAL_9600),
m_brightness(brightness),
m_mode(MODE_IDLE)
{
assert(callsign != NULL);
assert(brightness >= 0U && brightness <= 100U);
}

Expand Down Expand Up @@ -190,6 +191,7 @@ void CTFTSerial::clearDStar()
void CTFTSerial::writeDMR(unsigned int slotNo, const char* src, bool group, const char* dst, const char* type)
{
assert(src != NULL);
assert(dst != NULL);
assert(type != NULL);

if (m_mode != MODE_DMR) {
Expand Down

0 comments on commit 2e84ab8

Please sign in to comment.