performance Prefer prefix ++/-- operators for non-primitive types.

Origin commit data
------------------
Commit: bb347b3a44
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2012-04-28 (Sat, 28 Apr 2012)
This commit is contained in:
Jacek Jendrzej
2012-04-28 10:56:27 +02:00
parent c179cc8762
commit 04be37cf14
41 changed files with 117 additions and 117 deletions

View File

@@ -48,10 +48,10 @@ Helpbox::Helpbox()
Helpbox::~Helpbox()
{
for (ContentLines::iterator it = m_lines.begin();
it != m_lines.end(); it++)
it != m_lines.end(); ++it)
{
for (std::vector<Drawable*>::iterator it2 = it->begin();
it2 != it->end(); it2++)
it2 != it->end(); ++it2)
{
delete *it2;
}

View File

@@ -120,7 +120,7 @@ void CHintBox::init(const char * const Caption, const char * const Text, const i
if (nw > width)
width = nw;
for (std::vector<char *>::const_iterator it = line.begin(); it != line.end(); it++)
for (std::vector<char *>::const_iterator it = line.begin(); it != line.end(); ++it)
{
int w = g_Font[SNeutrinoSettings::FONT_TYPE_MENU]->getRenderWidth(*it, true); // UTF-8
maxLineWidth = std::max(maxLineWidth, w);
@@ -201,7 +201,7 @@ void CHintBox::refresh(void)
int count = entries_per_page;
int ypos = theight + (fheight >> 1);
for (std::vector<char *>::const_iterator it = line.begin() + (entries_per_page * current_page); ((it != line.end()) && (count > 0)); it++, count--)
for (std::vector<char *>::const_iterator it = line.begin() + (entries_per_page * current_page); ((it != line.end()) && (count > 0)); ++it, count--)
window->RenderString(g_Font[SNeutrinoSettings::FONT_TYPE_MENU], textStartX, (ypos += fheight), width, *it, (CFBWindow::color_t)COL_MENUCONTENT, 0, true); // UTF-8
if (entries_per_page < line.size())

View File

@@ -85,10 +85,10 @@ CHintBoxExt::~CHintBoxExt(void)
// content has been set using "m_message" so we are responsible to
// delete it
for (ContentLines::iterator it = m_lines.begin();
it != m_lines.end(); it++)
it != m_lines.end(); ++it)
{
for (std::vector<Drawable*>::iterator it2 = it->begin();
it2 != it->end(); it2++)
it2 != it->end(); ++it2)
{
//(*it2)->print();
delete *it2;
@@ -116,13 +116,13 @@ void CHintBoxExt::init(const neutrino_locale_t Caption, const int Width, const c
int maxWidth = m_width > 0 ? m_width : 0;
int maxOverallHeight = 0;
m_startEntryOfPage.push_back(0);
for (ContentLines::iterator it = m_lines.begin(); it!=m_lines.end(); it++)
for (ContentLines::iterator it = m_lines.begin(); it!=m_lines.end(); ++it)
{
bool pagebreak = false;
int maxHeight = 0;
int lineWidth = 0;
for (std::vector<Drawable*>::iterator item = it->begin();
item != it->end(); item++) {
item != it->end(); ++item) {
if ((*item)->getHeight() > maxHeight)
maxHeight = (*item)->getHeight();
lineWidth += (*item)->getWidth();
@@ -263,11 +263,11 @@ void CHintBoxExt::refresh(bool toround)
for (ContentLines::iterator it = m_lines.begin() + m_startEntryOfPage[m_currentPage];
it != m_lines.begin() + m_startEntryOfPage[m_currentPage+1]
&& it != m_lines.end(); it++)
&& it != m_lines.end(); ++it)
{
int xPos = textStartX;
int maxHeight = 0;
for (std::vector<Drawable*>::iterator d = it->begin();d!=it->end();d++)
for (std::vector<Drawable*>::iterator d = it->begin();d!=it->end();++d)
{
// (*d)->print();
// printf("\n");

View File

@@ -81,7 +81,7 @@ void CExtendedInput::Init(void)
CExtendedInput::~CExtendedInput()
{
for (std::vector<CExtendedInput_Item*>::iterator it = inputFields.begin(); it < inputFields.end(); it++)
for (std::vector<CExtendedInput_Item*>::iterator it = inputFields.begin(); it < inputFields.end(); ++it)
delete *it;
}