Skip to content

Commit

Permalink
Added lacking IF_HEAVY_LOGGING for logging off. Removed duplicated def
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki authored and rndi committed Nov 7, 2019
1 parent 96103f7 commit 04dde1e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 1 addition & 6 deletions srtcore/buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1048,12 +1048,7 @@ bool CRcvBuffer::getRcvReadyMsg(ref_t<uint64_t> tsbpdtime, ref_t<int32_t> curpkt
{
*tsbpdtime = 0;

#if ENABLE_HEAVY_LOGGING
const char* reason = "NOT RECEIVED";
#define IF_HEAVY_LOGGING(instr) instr
#else
#define IF_HEAVY_LOGGING(instr) (void)0
#endif
IF_HEAVY_LOGGING(const char* reason = "NOT RECEIVED");

for (int i = m_iStartPos, n = m_iLastAckPos; i != n; i = (i + 1) % m_iSize)
{
Expand Down
2 changes: 2 additions & 0 deletions srtcore/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ written by
#define HLOGF(...)
#define HLOGP(...)

#define IF_HEAVY_LOGGING(instr) (void)0

#endif

namespace srt_logging
Expand Down

0 comments on commit 04dde1e

Please sign in to comment.