diff options
Diffstat (limited to 'src/pgm_image.cpp')
-rw-r--r-- | src/pgm_image.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pgm_image.cpp b/src/pgm_image.cpp index a88455c..04ff9b9 100644 --- a/src/pgm_image.cpp +++ b/src/pgm_image.cpp @@ -14,14 +14,14 @@ * limitations under the License. */ -#include "pgm_image.h" +#include "pgm_image.hpp" #include <cstring> #include <charconv> #include <fstream> #include <string> -SDL_bool PGMImage_constructor(PGMImage *self, const char *file_path) +bool PGMImage_constructor(PGMImage *self, const char *file_path) { self->data = nullptr; int wh_pos; @@ -31,7 +31,7 @@ SDL_bool PGMImage_constructor(PGMImage *self, const char *file_path) if(!file) { self->error = "Failed to open PGM file"; - return SDL_FALSE; + return false; } // Read file magic. @@ -39,7 +39,7 @@ SDL_bool PGMImage_constructor(PGMImage *self, const char *file_path) if(line != "P5") { self->error = "PGM file contains a invalid magic"; - return SDL_FALSE; + return false; } // Read file comment. @@ -61,7 +61,7 @@ SDL_bool PGMImage_constructor(PGMImage *self, const char *file_path) self->data = new char[self->data_size]; file.read(self->data, self->data_size); - return SDL_TRUE; + return true; } void PGMImage_destructor(PGMImage *self) |