Skip to content

Commit

Permalink
Use sf::err() for error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisThrasher committed Dec 29, 2023
1 parent 0601d5f commit 138e749
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/SFML/Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Define macros to check the validity of CSFML objects in debug run
////////////////////////////////////////////////////////////
#include <stdio.h>
#include <SFML/System/Err.hpp>

#ifndef NDEBUG

Expand All @@ -37,7 +37,7 @@
{ \
if (object_ == NULL) \
{ \
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
return; \
} \
} \
Expand All @@ -52,7 +52,7 @@
} \
else \
{ \
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
} \
} \
while (0)
Expand All @@ -66,7 +66,7 @@
} \
else \
{ \
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
} \
} \
while (0)
Expand All @@ -76,7 +76,7 @@
{ \
if (object_ == NULL) \
{ \
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
return default_; \
} \
} \
Expand All @@ -89,7 +89,7 @@
} \
else \
{ \
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
return default_; \
}

Expand All @@ -100,7 +100,7 @@
} \
else \
{ \
fprintf(stderr, "SFML warning: trying to use a null " #object_ " object\n"); \
sf::err() << "SFML warning: trying to use a null " #object_ " object\n"; \
return default_; \
}

Expand Down

0 comments on commit 138e749

Please sign in to comment.