Print function only prints if debugging is enabled
I want to keep actual output to a minimum when running a release version.
This commit is contained in:
parent
bf3d41f8d2
commit
b939fa12a4
2
Makefile
2
Makefile
|
@ -17,7 +17,7 @@ DIRS = libsaria gui
|
|||
CLEANDIRS = $(DIRS:%=clean-%)
|
||||
|
||||
ifeq ($(DEBUG), y)
|
||||
export CFLAGS = -Wall -Werror -g
|
||||
export CFLAGS = -Wall -Werror -g -DDEBUG
|
||||
else
|
||||
export CFLAGS = -O2
|
||||
endif
|
||||
|
|
|
@ -4,7 +4,13 @@ using namespace std;
|
|||
|
||||
#include <libsaria/print.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
void print(string item)
|
||||
{
|
||||
cout << item << endl;
|
||||
}
|
||||
#else /* DEBUG */
|
||||
void print(string item)
|
||||
{
|
||||
}
|
||||
#endif /* DEBUG */
|
||||
|
|
Loading…
Reference in New Issue