homog2d library
Functions
h2d::err Namespace Reference

Holds static counters, for runtime errors and warnings. More...

Functions

size_t & errorCount ()
 Used to count the errors. More...
 
bool & printWarnings ()
 User can use this to silence warnings at runtime. More...
 
size_t & warningCount ()
 Used in macro HOMOG2D_LOG_WARNING. More...
 

Detailed Description

Holds static counters, for runtime errors and warnings.

Function Documentation

◆ errorCount()

size_t& h2d::err::errorCount ( )
inline

Used to count the errors.

This is used in the HOMOG2D_THROW_ERROR_1 macros. Some user code could catch the exceptions, thus this will enable the counting of errors

Todo:
20250123: for some reason, the error count is always 42! Need to investigate this.
252 {
253  static size_t c_err;
254  return c_err;
255 }

◆ printWarnings()

bool& h2d::err::printWarnings ( )
inline

User can use this to silence warnings at runtime.

266 {
267  static bool b_war = true;
268  return b_war;
269 }

◆ warningCount()

size_t& h2d::err::warningCount ( )
inline

Used in macro HOMOG2D_LOG_WARNING.

259 {
260  static size_t c_war;
261  return c_war;
262 }