diff options
author | Colin Snover | 2017-12-19 19:27:13 -0600 |
---|---|---|
committer | Eugene Sandulenko | 2018-08-18 16:30:05 +0200 |
commit | 481b608c51858d0b6afc3cfb461664fc9575c6a0 (patch) | |
tree | 984187ecdb5246049f02a7e46aa802739fedd93e /engines/parallaction/gfxbase.cpp | |
parent | bc3c8bd8d251b7a0631e1993e6365719382eacf6 (diff) | |
download | scummvm-rg350-481b608c51858d0b6afc3cfb461664fc9575c6a0.tar.gz scummvm-rg350-481b608c51858d0b6afc3cfb461664fc9575c6a0.tar.bz2 scummvm-rg350-481b608c51858d0b6afc3cfb461664fc9575c6a0.zip |
PARALLACTION: Replace use of strdup with Common::String & malloc
Diffstat (limited to 'engines/parallaction/gfxbase.cpp')
-rw-r--r-- | engines/parallaction/gfxbase.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/engines/parallaction/gfxbase.cpp b/engines/parallaction/gfxbase.cpp index 819804bfe7..273804d74a 100644 --- a/engines/parallaction/gfxbase.cpp +++ b/engines/parallaction/gfxbase.cpp @@ -31,20 +31,12 @@ namespace Parallaction { GfxObj::GfxObj(uint objType, Frames *frames, const char* name) : - _frames(frames), x(0), y(0), z(0), _prog(0), _flags(0), + _name(name), _frames(frames), x(0), y(0), z(0), _prog(0), _flags(0), type(objType), frame(0), layer(3), scale(100), _hasMask(false), _hasPath(false), - transparentKey(0), _maskId(0), _pathId(0) { - - if (name) { - _name = strdup(name); - } else { - _name = 0; - } -} + transparentKey(0), _maskId(0), _pathId(0) {} GfxObj::~GfxObj() { delete _frames; - free(_name); } void GfxObj::release() { @@ -53,7 +45,7 @@ void GfxObj::release() { } const char *GfxObj::getName() const { - return _name; + return _name.c_str(); } uint GfxObj::getNum() { |