Skip to content

Commit

Permalink
#12 rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
F4FXL committed Jan 5, 2022
1 parent 6a7cf1a commit 6fae942
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions APRSWriterThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ m_exit(false),
m_connected(false),
m_reconnectTimer(1000U),
m_tries(0U),
m_APRSReadCallback(),
m_APRSReadCallbacks(),
m_filter(""),
m_clientName(FULL_PRODUCT_NAME)
{
Expand All @@ -72,7 +72,7 @@ m_exit(false),
m_connected(false),
m_reconnectTimer(1000U),
m_tries(0U),
m_APRSReadCallback(),
m_APRSReadCallbacks(),
m_filter(filter),
m_clientName(clientName)
{
Expand All @@ -91,9 +91,9 @@ m_clientName(clientName)
CAPRSWriterThread::~CAPRSWriterThread()
{
std::vector<CReadAPRSFrameCallback *> callBacksCopy;
callBacksCopy.assign(m_APRSReadCallback.begin(), m_APRSReadCallback.end());
callBacksCopy.assign(m_APRSReadCallbacks.begin(), m_APRSReadCallbacks.end());

m_APRSReadCallback.clear();
m_APRSReadCallbacks.clear();

for(auto cb : callBacksCopy) {
delete cb;
Expand Down Expand Up @@ -171,11 +171,11 @@ void* CAPRSWriterThread::Entry()
CLog::logDebug("Received APRS Frame : %s", line.c_str());

if(length > 0 && line[0] != '#'//check if we have something and if that something is an APRS frame
&& m_APRSReadCallback.size() > 0U)//do we have someone wanting an APRS Frame?
&& m_APRSReadCallbacks.size() > 0U)//do we have someone wanting an APRS Frame?
{
CAPRSFrame readFrame;
if(CAPRSParser::parseFrame(line, readFrame)) {
for(auto cb : m_APRSReadCallback) {
for(auto cb : m_APRSReadCallbacks) {
CAPRSFrame f(readFrame);
cb->readAprsFrame(f);
}
Expand Down Expand Up @@ -210,7 +210,7 @@ void* CAPRSWriterThread::Entry()
void CAPRSWriterThread::addReadAPRSCallback(CReadAPRSFrameCallback * cb)
{
assert(cb != nullptr);
m_APRSReadCallback.push_back(cb);
m_APRSReadCallbacks.push_back(cb);
}

void CAPRSWriterThread::write(CAPRSFrame& frame)
Expand Down
2 changes: 1 addition & 1 deletion APRSWriterThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CAPRSWriterThread : public CThread {
bool m_connected;
CTimer m_reconnectTimer;
unsigned int m_tries;
std::vector<CReadAPRSFrameCallback *> m_APRSReadCallback;
std::vector<CReadAPRSFrameCallback *> m_APRSReadCallbacks;
std::string m_filter;
std::string m_clientName;

Expand Down

0 comments on commit 6fae942

Please sign in to comment.