1. image_data.hpp - fixed mismatched new/new[] in ctor in ImageData
2. image_data.hpp - initialize image data (ImageData) 3. unicode.hpp - added missing <iostream> when in debug -DMAPNIK_DEBUG
This commit is contained in:
parent
44a83c0eac
commit
f736196cb4
2 changed files with 11 additions and 7 deletions
|
@ -39,13 +39,14 @@ namespace mapnik
|
|||
height_(height),
|
||||
pData_((width!=0 && height!=0)? static_cast<T*>(::operator new(sizeof(T)*width*height)):0)
|
||||
{
|
||||
//if (pData_) memset(pData_,0,sizeof(T)*width_*height_);
|
||||
if (pData_) memset(pData_,0,sizeof(T)*width_*height_);
|
||||
}
|
||||
|
||||
ImageData(const ImageData<T>& rhs)
|
||||
:width_(rhs.width_),
|
||||
height_(rhs.height_),
|
||||
pData_((rhs.width_!=0 && rhs.height_!=0)? new T[rhs.width_*rhs.height_]:0)
|
||||
pData_((rhs.width_!=0 && rhs.height_!=0)?
|
||||
static_cast<T*>(::operator new(sizeof(T)*rhs.width_*rhs.height_)) :0)
|
||||
{
|
||||
if (pData_) memcpy(pData_,rhs.pData_,sizeof(T)*rhs.width_* rhs.height_);
|
||||
}
|
||||
|
@ -126,11 +127,10 @@ namespace mapnik
|
|||
}
|
||||
|
||||
private:
|
||||
const unsigned width_;
|
||||
const unsigned height_;
|
||||
T *pData_;
|
||||
ImageData& operator=(const ImageData&);
|
||||
|
||||
const unsigned width_;
|
||||
const unsigned height_;
|
||||
T *pData_;
|
||||
ImageData& operator=(const ImageData&);
|
||||
};
|
||||
|
||||
typedef ImageData<unsigned> ImageData32;
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
#include <iconv.h>
|
||||
#include <string>
|
||||
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
namespace mapnik {
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue