]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMIProjectTreeNode.cpp
Feature #1711
[crea.git] / lib / creaDevManagerLib / modelCDMIProjectTreeNode.cpp
index 8676627df6bf2717ab480dcf90e5244461a10772..fb02b7134175771239231defaec764f14c20461f 100644 (file)
@@ -23,7 +23,7 @@
 #  The fact that you are presently reading this means that you have had
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------
-*/
+ */
 
 /*
  * modelCDMIProjectTreeNode.cpp
@@ -49,37 +49,37 @@ bool modelCDMIProjectTreeNode::CompareNodeItem(const modelCDMIProjectTreeNode* x
   unsigned char yType = y->GetType();
 
   while ((i < xName.length()) && (i < yName.length()))
-  {
-    if (tolower (xName[i]) < tolower (yName[i]))
-    {
-      noWinner = false;
-      returnValue = true;
-      break;
-    }
-    else if (tolower (xName[i]) > tolower (yName[i]))
     {
-      noWinner = false;
-      returnValue = false;
-      break;
+      if (tolower (xName[i]) < tolower (yName[i]))
+        {
+          noWinner = false;
+          returnValue = true;
+          break;
+        }
+      else if (tolower (xName[i]) > tolower (yName[i]))
+        {
+          noWinner = false;
+          returnValue = false;
+          break;
+        }
+      i++;
     }
-    i++;
-  }
 
   if(noWinner)
-  {
-    if (xName.length() < yName.length())
-      returnValue = true;
-    else
-      returnValue = false;
-  }
+    {
+      if (xName.length() < yName.length())
+        returnValue = true;
+      else
+        returnValue = false;
+    }
 
   if(xType != yType)
-  {
-    if(xType == wxDIR_DIRS)
-      returnValue = true;
-    else
-      returnValue = false;
-  }
+    {
+      if(xType == wxDIR_DIRS)
+        returnValue = true;
+      else
+        returnValue = false;
+    }
 
   return returnValue;
 }
@@ -145,10 +145,10 @@ const int& modelCDMIProjectTreeNode::GetLength()
 const bool modelCDMIProjectTreeNode::OpenInFileExplorer(std::string*& result) const
 {
   if (!CDMUtilities::openFileExplorer(this->GetPath()))
-      return true;
-    else
-      {
-        result = new std::string("Couldn't open file.");
-        return false;
-      }
+    return true;
+  else
+    {
+      result = new std::string("Couldn't open file.");
+      return false;
+    }
 }