diff options
author | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-06 14:15:07 +0200 |
---|---|---|
committer | Rodrigo Arias Mallo <rodarima@gmail.com> | 2024-08-07 16:50:56 +0200 |
commit | f1b04c40ba9faf9b7b8969cf3686c35bb7b79b33 (patch) | |
tree | 9e37bde60e1aa7ee17bcd00fe77e5c48151ff224 /dw/image.cc | |
parent | 83e88446c99f793f696984904e47070a287fd15d (diff) |
Use dStrdup instead of strdup
The strdup function is not available in POSIX-2001, so we use our own
implementation in dlib: dStrdup.
Reviewed-by: dogma
Diffstat (limited to 'dw/image.cc')
-rw-r--r-- | dw/image.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dw/image.cc b/dw/image.cc index 82118949..fc914f44 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -20,6 +20,7 @@ #include "image.hh" +#include "dlib/dlib.h" #include "../lout/msg.h" #include "../lout/misc.hh" #include "../lout/debug.hh" @@ -146,7 +147,7 @@ Image::Image(const char *altText) { DBG_OBJ_CREATE ("dw::Image"); registerName ("dw::Image", &CLASS_ID); - this->altText = altText ? strdup (altText) : NULL; + this->altText = altText ? dStrdup (altText) : NULL; altTextWidth = -1; // not yet calculated buffer = NULL; bufWidth = bufHeight = -1; |