Some small formatting changes

This commit is contained in:
Pavel Krajcevski 2013-09-13 16:25:00 -04:00
parent 571bf1ebd0
commit 2540032acc
2 changed files with 13 additions and 15 deletions

View file

@ -70,12 +70,11 @@ struct CompressionJob {
const unsigned char *_inBuf, const unsigned char *_inBuf,
unsigned char *_outBuf, unsigned char *_outBuf,
const uint32 _width, const uint32 _width,
const uint32 _height const uint32 _height)
) : : inBuf(_inBuf)
inBuf(_inBuf), , outBuf(_outBuf)
outBuf(_outBuf), , width(_width)
width(_width), , height(_height)
height(_height)
{ } { }
}; };
@ -91,12 +90,11 @@ struct DecompressionJob {
const unsigned char *_inBuf, const unsigned char *_inBuf,
unsigned char *_outBuf, unsigned char *_outBuf,
const uint32 _width, const uint32 _width,
const uint32 _height const uint32 _height)
) : : inBuf(_inBuf)
inBuf(_inBuf), , outBuf(_outBuf)
outBuf(_outBuf), , width(_width)
width(_width), , height(_height)
height(_height)
{ } { }
}; };

View file

@ -58,8 +58,8 @@ static inline T sad( const T &a, const T &b ) {
Image::Image(const Image &other) Image::Image(const Image &other)
: m_Width(other.m_Width) : m_Width(other.m_Width)
, m_Height(other.m_Height) , m_Height(other.m_Height)
, m_PixelData(new uint8[m_Width * m_Height * 4])
, m_bBlockStreamOrder(other.GetBlockStreamOrder()) , m_bBlockStreamOrder(other.GetBlockStreamOrder())
, m_PixelData(new uint8[m_Width * m_Height * 4])
{ {
if(m_PixelData) { if(m_PixelData) {
memcpy(m_PixelData, other.m_PixelData, m_Width * m_Height * 4); memcpy(m_PixelData, other.m_PixelData, m_Width * m_Height * 4);
@ -72,8 +72,8 @@ Image::Image(const Image &other)
Image::Image(uint32 width, uint32 height, const uint32 *pixels) Image::Image(uint32 width, uint32 height, const uint32 *pixels)
: m_Width(width) : m_Width(width)
, m_Height(height) , m_Height(height)
, m_PixelData(new uint8[4 * m_Width * m_Height])
, m_bBlockStreamOrder(false) , m_bBlockStreamOrder(false)
, m_PixelData(new uint8[4 * m_Width * m_Height])
{ {
if(m_PixelData && pixels) if(m_PixelData && pixels)
memcpy(m_PixelData, pixels, m_Width * m_Height * sizeof(uint32)); memcpy(m_PixelData, pixels, m_Width * m_Height * sizeof(uint32));
@ -122,8 +122,8 @@ Image::Image(const CompressedImage &ci)
Image::Image(const ImageLoader &loader) Image::Image(const ImageLoader &loader)
: m_Width(loader.GetWidth()) : m_Width(loader.GetWidth())
, m_Height(loader.GetHeight()) , m_Height(loader.GetHeight())
, m_PixelData(0)
, m_bBlockStreamOrder(true) , m_bBlockStreamOrder(true)
, m_PixelData(0)
{ {
if(loader.GetImageData()) { if(loader.GetImageData()) {
m_PixelData = new uint8[ loader.GetImageDataSz() ]; m_PixelData = new uint8[ loader.GetImageDataSz() ];