+ Prefer prefix ++/-- operators for non-primitive types
This commit is contained in:
parent
b7be7aec13
commit
7ca6bb4072
|
@ -1406,7 +1406,7 @@ void Application::logStatus()
|
|||
time(&now);
|
||||
Console().Log("Time = %s", ctime(&now));
|
||||
|
||||
for (std::map<std::string,std::string>::iterator It = mConfig.begin();It!= mConfig.end();It++) {
|
||||
for (std::map<std::string,std::string>::iterator It = mConfig.begin();It!= mConfig.end();++It) {
|
||||
Console().Log("%s = %s\n",It->first.c_str(),It->second.c_str());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,8 +80,8 @@ PyMethodDef Application::Methods[] = {
|
|||
"Get the name of the module that can export the filetype"},
|
||||
{"getResourceDir", (PyCFunction) Application::sGetResourceDir ,1,
|
||||
"Get the root directory of all resources"},
|
||||
{"getUserAppDataDir", (PyCFunction) Application::sGetUserAppDataDir ,1,
|
||||
"Get the root directory of user settings"},
|
||||
{"getUserAppDataDir", (PyCFunction) Application::sGetUserAppDataDir ,1,
|
||||
"Get the root directory of user settings"},
|
||||
{"getHomePath", (PyCFunction) Application::sGetHomePath ,1,
|
||||
"Get the home path, i.e. the parent directory of the executable"},
|
||||
|
||||
|
@ -360,7 +360,7 @@ PyObject* Application::sDumpConfig(PyObject * /*self*/, PyObject *args,PyObject
|
|||
|
||||
PyObject *dict = PyDict_New();
|
||||
for (std::map<std::string,std::string>::iterator It= GetApplication()._mConfig.begin();
|
||||
It!=GetApplication()._mConfig.end();It++) {
|
||||
It!=GetApplication()._mConfig.end();++It) {
|
||||
PyDict_SetItemString(dict,It->first.c_str(), PyString_FromString(It->second.c_str()));
|
||||
}
|
||||
return dict;
|
||||
|
@ -527,15 +527,15 @@ PyObject* Application::sGetResourceDir(PyObject * /*self*/, PyObject *args,PyObj
|
|||
return Py::new_reference_to(datadir);
|
||||
}
|
||||
|
||||
PyObject* Application::sGetUserAppDataDir(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
return NULL; // NULL triggers exception
|
||||
|
||||
Py::String user_data_dir(Application::getUserAppDataDir(),"utf-8");
|
||||
return Py::new_reference_to(user_data_dir);
|
||||
}
|
||||
|
||||
PyObject* Application::sGetUserAppDataDir(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
return NULL; // NULL triggers exception
|
||||
|
||||
Py::String user_data_dir(Application::getUserAppDataDir(),"utf-8");
|
||||
return Py::new_reference_to(user_data_dir);
|
||||
}
|
||||
|
||||
PyObject* Application::sGetHomePath(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args, "")) // convert args: Python->C
|
||||
|
|
|
@ -765,7 +765,7 @@ inline BoundBox3<_Precision>::BoundBox3 (const Vector3<_Precision> *pclVect, uns
|
|||
MaxX(-FLOAT_MAX), MaxY(-FLOAT_MAX), MaxZ(-FLOAT_MAX)
|
||||
{
|
||||
const Vector3<_Precision> *pI, *pEnd = pclVect + ulCt;
|
||||
for (pI = pclVect; pI < pEnd; pI++)
|
||||
for (pI = pclVect; pI < pEnd; ++pI)
|
||||
{
|
||||
MinX = std::min<_Precision>(MinX, pI->x);
|
||||
MinY = std::min<_Precision>(MinY, pI->y);
|
||||
|
|
|
@ -169,7 +169,7 @@ public:
|
|||
*/
|
||||
void Notify(_MessageType rcReason)
|
||||
{
|
||||
for(typename std::set<Observer<_MessageType> * >::iterator Iter=_ObserverSet.begin();Iter!=_ObserverSet.end();Iter++)
|
||||
for(typename std::set<Observer<_MessageType> * >::iterator Iter=_ObserverSet.begin();Iter!=_ObserverSet.end();++Iter)
|
||||
(*Iter)->OnChange(*this,rcReason); // send OnChange-signal
|
||||
}
|
||||
|
||||
|
@ -180,7 +180,7 @@ public:
|
|||
Observer<_MessageType> * Get(const char *Name)
|
||||
{
|
||||
const char* OName;
|
||||
for(typename std::set<Observer<_MessageType> * >::iterator Iter=_ObserverSet.begin();Iter!=_ObserverSet.end();Iter++)
|
||||
for(typename std::set<Observer<_MessageType> * >::iterator Iter=_ObserverSet.begin();Iter!=_ObserverSet.end();++Iter)
|
||||
{
|
||||
OName = (*Iter)->Name(); // get the name
|
||||
if(OName && strcmp(OName,Name) == 0)
|
||||
|
|
|
@ -62,7 +62,7 @@ void UndoDialog::onFetchInfo()
|
|||
if (pcDoc)
|
||||
{
|
||||
std::vector<std::string> vecUndos = pcDoc->getUndoVector();
|
||||
for (std::vector<std::string>::iterator i=vecUndos.begin(); i!=vecUndos.end(); i++)
|
||||
for (std::vector<std::string>::iterator i=vecUndos.begin(); i!=vecUndos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
}
|
||||
else
|
||||
|
@ -70,7 +70,7 @@ void UndoDialog::onFetchInfo()
|
|||
EditorView* view = qobject_cast<EditorView*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
QStringList vecUndos = view->undoActions();
|
||||
for (QStringList::Iterator i=vecUndos.begin(); i!=vecUndos.end(); i++)
|
||||
for (QStringList::Iterator i=vecUndos.begin(); i!=vecUndos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
}
|
||||
}
|
||||
|
@ -116,10 +116,10 @@ void RedoDialog::onFetchInfo()
|
|||
{
|
||||
clear(); // Remove first all items
|
||||
Gui::Document* pcDoc = Application::Instance->activeDocument();
|
||||
if ( pcDoc )
|
||||
if (pcDoc)
|
||||
{
|
||||
std::vector<std::string> vecRedos = pcDoc->getRedoVector();
|
||||
for (std::vector<std::string>::iterator i=vecRedos.begin(); i!=vecRedos.end(); i++)
|
||||
for (std::vector<std::string>::iterator i=vecRedos.begin(); i!=vecRedos.end(); ++i)
|
||||
addAction(QString::fromUtf8((*i).c_str()), this, SLOT(onSelected()));
|
||||
}
|
||||
else
|
||||
|
@ -127,7 +127,7 @@ void RedoDialog::onFetchInfo()
|
|||
EditorView* view = qobject_cast<EditorView*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
QStringList vecRedos = view->redoActions();
|
||||
for (QStringList::Iterator i=vecRedos.begin(); i!=vecRedos.end(); i++)
|
||||
for (QStringList::Iterator i=vecRedos.begin(); i!=vecRedos.end(); ++i)
|
||||
addAction(*i, this, SLOT(onSelected()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user