Replace Path's name from char* to std::string.

This commit is contained in:
David Capello 2010-11-06 20:40:03 -03:00
parent 18b0f903d7
commit 1283c9d950
2 changed files with 4 additions and 2 deletions

View File

@ -35,8 +35,8 @@ static void draw_path(Path* path, Image *image, int color, double brush_size, in
Path::Path(const char* name)
: GfxObj(GFXOBJ_PATH)
, name(name)
{
this->name = name ? jstrdup(name) : NULL;
this->join = PATH_JOIN_ROUND;
this->cap = PATH_CAP_ROUND;
this->size = 0;
@ -49,6 +49,7 @@ Path::Path(const char* name)
Path::Path(const Path& path)
: GfxObj(path)
, name(path.name)
{
this->join = path.join;
this->cap = path.cap;

View File

@ -20,6 +20,7 @@
#define RASTER_PATH_H_INCLUDED
#include "raster/gfxobj.h"
#include <string>
struct _ArtBpath;
class Image;
@ -41,7 +42,7 @@ enum {
class Path : public GfxObj
{
public:
char *name;
std::string name;
int join, cap;
int size, end;
struct _ArtBpath *bpath;