Index: /cpp/frams/_demos/simil_test.cpp
===================================================================
--- /cpp/frams/_demos/simil_test.cpp	(revision 360)
+++ /cpp/frams/_demos/simil_test.cpp	(revision 361)
@@ -36,6 +36,4 @@
     ...
     <row_n>
-
-    Last modified: 2015-04-16
  */
 int main(int argc, char *argv[])
@@ -160,16 +158,15 @@
     // create the empty array of similarities
     aaSimil = new pDouble [pvGenos->size()];
-    for (int k = 0; k < (int) pvGenos->size(); k++)
+    for (unsigned int k = 0; k < pvGenos->size(); k++)
     {
         aaSimil[k] = new double [pvGenos->size()];
-        for (int l = 0; l < (int) pvGenos->size(); l++)
+		for (unsigned int l = 0; l < pvGenos->size(); l++)
             aaSimil[k][l] = 0.0;
     }
 
     // compute and remember similarities
-    int i, j;
-    for (i = 0; i < (int) pvGenos->size(); i++)
-    {
-        for (j = 0; j < (int) pvGenos->size(); j++)
+	for (unsigned int i = 0; i < pvGenos->size(); i++)
+    {
+		for (unsigned int j = 0; j < pvGenos->size(); j++)
         {
             dSimilarity = M.EvaluateDistance(pvGenos->operator[](i), pvGenos->operator[](j));
@@ -183,15 +180,14 @@
         // print the number of genotypes and their names
         printf("%li\n", pvGenos->size());
-        int iGen;
-        for (iGen = 0; iGen < (int) pvNames->size(); iGen++)
+		for (unsigned int iGen = 0; iGen < pvNames->size(); iGen++)
         {
             printf("%s\n", pvNames->at(iGen));
         }
-    } // if (bPrintNames)
+    }
 
     // print out the matrix of similarities
-    for (i = 0; i < (int) pvGenos->size(); i++)
-    {
-        for (j = 0; j < (int) pvGenos->size(); j++)
+	for (unsigned int i = 0; i < pvGenos->size(); i++)
+    {
+		for (unsigned int j = 0; j < pvGenos->size(); j++)
         {
             printf("%.2lf\t", aaSimil[i][j]);
@@ -201,5 +197,5 @@
 
     // delete vectors and arrays
-    for (i = 0; i < (int) pvGenos->size(); i++)
+	for (unsigned int i = 0; i < pvGenos->size(); i++)
     {
         delete pvGenos->operator[](i);
Index: /cpp/frams/model/similarity/simil_match.cpp
===================================================================
--- /cpp/frams/model/similarity/simil_match.cpp	(revision 360)
+++ /cpp/frams/model/similarity/simil_match.cpp	(revision 361)
@@ -26,10 +26,9 @@
 
     // fill vectors with "unmatched" indicator
-    int i;
-    for (i = 0; i < (int) m_apvMatched[0]->size(); i++)
+	for (unsigned int i = 0; i < m_apvMatched[0]->size(); i++)
     {
         m_apvMatched[0]->operator[](i) = -1;
     }
-    for (i = 0; i < (int) m_apvMatched[1]->size(); i++)
+	for (unsigned int i = 0; i < m_apvMatched[1]->size(); i++)
     {
         m_apvMatched[1]->operator[](i) = -1;
@@ -149,6 +148,4 @@
     // index of the smallest object
     int nObj;
-    // index of an element
-    int nElem;
 
     // find the smallest object (its index)
@@ -163,5 +160,5 @@
 
     // check if all elements of the smallest object are matched
-    for (nElem = 0; nElem < (int) m_apvMatched[ nObj ]->size(); nElem++)
+	for (unsigned int nElem = 0; nElem < m_apvMatched[nObj]->size(); nElem++)
     {
         if (m_apvMatched[ nObj ]->operator[](nElem) < 0)
@@ -184,10 +181,9 @@
     // result - assume that matching is empty
     bool bResult = true;
-    int nElem;
 
     // matching is empty if either of objects has only unmatched elements
     // so it may be first object 
     int nObj = 0;
-    for (nElem = 0; nElem < (int) m_apvMatched[ nObj ]->size(); nElem++)
+	for (unsigned int nElem = 0; nElem < m_apvMatched[nObj]->size(); nElem++)
     {
         if (m_apvMatched[ nObj ]->operator[](nElem) >= 0)
@@ -207,10 +203,8 @@
 void SimilMatching::Empty()
 {
-    int iObj; // a counter of objects
-    int iElem; // a counter of objects' elements
-    for (iObj = 0; iObj < 2; iObj++)
+    for (int iObj = 0; iObj < 2; iObj++) // a counter of objects
     {
         // for each object in the matching
-        for (iElem = 0; iElem < (int) m_apvMatched[ iObj ]->size(); iElem++)
+		for (unsigned int iElem = 0; iElem < m_apvMatched[iObj]->size(); iElem++) // a counter of objects' elements
         {
             // for each element iElem for the object iObj
@@ -228,5 +222,4 @@
 void SimilMatching::PrintMatching()
 {
-    int i;
     int nBigger;
 
@@ -243,7 +236,7 @@
     // print first line - indices of objects
     printf("[ ");
-    for (i = 0; i < (int) m_apvMatched[ nBigger ]->size(); i++)
-    {
-        printf("%2i ", i);
+	for (unsigned int i = 0; i < m_apvMatched[nBigger]->size(); i++)
+    {
+        printf("%2d ", i);
     }
     printf("]\n");
@@ -254,10 +247,10 @@
         // for both objects - print out lines of matched elements
         printf("[ ");
-        for (i = 0; i < (int) m_apvMatched[ nObj ]->size(); i++)
+		for (unsigned int i = 0; i < m_apvMatched[nObj]->size(); i++)
         {
             if (IsMatched(nObj, i))
             {
                 // if the element is matched - print the index
-                printf("%2i ", GetMatchedIndex(nObj, i));
+                printf("%2d ", GetMatchedIndex(nObj, i));
             }
             else
Index: /cpp/frams/model/similarity/simil_model.cpp
===================================================================
--- /cpp/frams/model/similarity/simil_model.cpp	(revision 360)
+++ /cpp/frams/model/similarity/simil_model.cpp	(revision 361)
@@ -734,5 +734,5 @@
                 {
                     GetNeighbIndexes(mod, partInd, nIndexes);
-                    for (int k = 0; k < (int) nIndexes.size(); k++)
+					for (unsigned int k = 0; k < nIndexes.size(); k++)
                     {
                         newDeg += m_fuzzyNeighb[mod][nIndexes.at(k)][depth - 1];
@@ -1722,9 +1722,12 @@
         // wartości orginalne transformacji dOrig uzyskuje się przez:
         // for ( iTrans = 0; iTrans <= TRANS_INDEX; iTrans++ ) dOrig *= dMul[ iTrans ];
+        //const char *szTransformNames[NO_OF_TRANSFORM] = { "ID", "S_yz", "S_xz", "S_xy", "R180_z", "R180_y", "R180_z", "S_(0,0,0)" };
         const int dMulX[ NO_OF_TRANSFORM ] = {1, -1, -1, 1, -1, 1, -1, -1};
         const int dMulY[ NO_OF_TRANSFORM ] = {1, 1, -1, -1, -1, -1, -1, 1};
         const int dMulZ[ NO_OF_TRANSFORM ] = {1, 1, 1, -1, -1, -1, 1, 1};
 
-#undef max
+#ifdef max
+ #undef max //this macro would conflict with line below
+#endif
         double dMinSimValue = std::numeric_limits<double>::max(); // minimum value of similarity
         int iMinSimTransform = -1; // index of the transformation with the minimum similarity
