summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-12-07 20:50:09 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-12-07 22:35:59 +0100
commit428d2cc1834c339d9151864dcb43df64fb8293bc (patch)
tree28e45668a2afb94dcb36ca5a17885e077854fcdb
parent3ef966ed27bec6d8d6c2edaf49befa15cd0d59d9 (diff)
astyle
-rw-r--r--src/lib/Pict1Parser.cpp10
-rw-r--r--src/lib/Pict2Parser.cpp10
-rw-r--r--src/lib/PictBitmap.cpp4
-rw-r--r--src/lib/PictImage.cpp4
4 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/Pict1Parser.cpp b/src/lib/Pict1Parser.cpp
index 6f03e27..4cffc25 100644
--- a/src/lib/Pict1Parser.cpp
+++ b/src/lib/Pict1Parser.cpp
@@ -156,7 +156,7 @@ bool Pict1Parser::parse()
{ 0xff, "EndOfPicture", &Pict1Parser::handleEndOfPicture, 1 }
};
- while(!m_input->isEnd())
+ while (!m_input->isEnd())
{
long initialPosition = m_input->tell();
int recordType = readU8();
@@ -165,21 +165,21 @@ bool Pict1Parser::parse()
// search function to handler this record
int index = -1;
- for(int i=0; i < (int)(sizeof(handlers)/sizeof(RecordHandler)); i++)
+ for (int i=0; i < (int)(sizeof(handlers)/sizeof(RecordHandler)); i++)
{
- if(handlers[i].type == recordType)
+ if (handlers[i].type == recordType)
{
index = i;
break;
}
}
- if(index >= 0)
+ if (index >= 0)
{
PICT_DEBUG_MSG(("Position: 0x%.8x, Opcode: 0x%.2x, Opcode Name: %s\n", (int)initialPosition, recordType, handlers[index].name));
m_recordSize = handlers[index].size;
Method recordHandler = handlers[index].handler;
- if(recordHandler)
+ if (recordHandler)
{
// invoke the handler for this record
(this->*recordHandler)();
diff --git a/src/lib/Pict2Parser.cpp b/src/lib/Pict2Parser.cpp
index 9dbb7cb..b65fc0e 100644
--- a/src/lib/Pict2Parser.cpp
+++ b/src/lib/Pict2Parser.cpp
@@ -205,7 +205,7 @@ bool Pict2Parser::parse()
{ 0xff, "EndOfPicture", &Pict2Parser::handleEndOfPicture, 2 }
};
- while(!m_input->isEnd())
+ while (!m_input->isEnd())
{
m_recordSize = -1;
long initialPosition = m_input->tell();
@@ -238,21 +238,21 @@ bool Pict2Parser::parse()
{
// search function to handler this record
int index = -1;
- for(int i=0; i < (int)(sizeof(handlers)/sizeof(RecordHandler)); i++)
+ for (int i=0; i < (int)(sizeof(handlers)/sizeof(RecordHandler)); i++)
{
- if(handlers[i].type == recordType)
+ if (handlers[i].type == recordType)
{
index = i;
break;
}
}
- if(index >= 0)
+ if (index >= 0)
{
PICT_DEBUG_MSG(("Position: 0x%.8x, Opcode: 0x%.2x, Opcode Name: %s\n", (int)initialPosition, recordType, handlers[index].name));
m_recordSize = handlers[index].size;
Method recordHandler = handlers[index].handler;
- if(recordHandler)
+ if (recordHandler)
{
// invoke the handler for this record
(this->*recordHandler)();
diff --git a/src/lib/PictBitmap.cpp b/src/lib/PictBitmap.cpp
index 3a3ad48..69d2e64 100644
--- a/src/lib/PictBitmap.cpp
+++ b/src/lib/PictBitmap.cpp
@@ -117,7 +117,7 @@ void libpict::PictBitmap::copyFrom(const PictBitmap &bitmap)
d->height = bitmap.d->height;
delete [] d->pixels;
d->pixels = new PictColor[d->width*d->height];
- for(int i=0; i < d->width*d->height; i++)
+ for (int i=0; i < d->width*d->height; i++)
d->pixels[i] = bitmap.d->pixels[i];
}
@@ -143,7 +143,7 @@ int libpict::PictBitmap::hres() const
void libpict::PictBitmap::setPixel(int x, int y, const libpict::PictColor &color)
{
- if((x < 0) || (y <0) || (x >= d->width) || (y >= d->height))
+ if ((x < 0) || (y <0) || (x >= d->width) || (y >= d->height))
return;
d->pixels[y*d->width + x] = color;
diff --git a/src/lib/PictImage.cpp b/src/lib/PictImage.cpp
index 32811ff..20e616f 100644
--- a/src/lib/PictImage.cpp
+++ b/src/lib/PictImage.cpp
@@ -37,7 +37,7 @@ bool libpict::PictImage::isSupported(librevenge::RVNGInputStream *input)
input->seek(0, librevenge::RVNG_SEEK_SET);
PictHeader header;
- if(!header.load(input))
+ if (!header.load(input))
return false;
return true;
@@ -59,7 +59,7 @@ bool libpict::PictImage::parse(librevenge::RVNGInputStream *input, librevenge::R
PICT_DEBUG_MSG(("Loading header...\n"));
PictHeader header;
- if(!header.load(input))
+ if (!header.load(input))
return false;
// seek to the start of document