Răsfoiți Sursa

fix warnings in linux build

David Rose 24 ani în urmă
părinte
comite
9c6ec62e46

+ 1 - 1
panda/src/chancfg/chancfg.cxx

@@ -403,7 +403,7 @@ ChanConfig::ChanConfig(GraphicsPipe* pipe, std::string cfg, Node *render,
   ChanViewport V(0., 1., 0., 1.);
   chan_eval(win, W, L, S, V, W.getChanOffset()+1, sizeX, sizeY, 
             render, want_cameras);
-  for(int dr_index=0; dr_index<_display_region.size(); dr_index++)
+  for(size_t dr_index=0; dr_index<_display_region.size(); dr_index++)
     _group_membership.push_back(W.getCameraGroup(dr_index));
 
   // sanity check

+ 1 - 1
panda/src/chancfg/chanparse.I

@@ -19,7 +19,7 @@
 #include <notify.h>
 
 INLINE void ChanEatFrontWhite(std::string& S) {
-  int i = S.find_first_not_of(" \t\r\f\n");
+  size_t i = S.find_first_not_of(" \t\r\f\n");
   if ((i != std::string::npos) && (i != 0))
     S.erase(0, i);
 }

+ 1 - 1
panda/src/chancfg/chanparse.cxx

@@ -35,7 +35,7 @@ INLINE std::string ChanReadLine(istream& is) {
 #endif /* BROKEN_EXCEPTIONS */
   std::string S;
   std::getline(is, S);
-  int i = S.find_first_not_of(" /t/f/r/n");
+  size_t i = S.find_first_not_of(" /t/f/r/n");
   if ((i == std::string::npos) || (S[i] == ';'))
     return ChanReadLine(is);  // all white space or comment
   if (i != 0)

+ 2 - 2
panda/src/chancfg/chansetup.cxx

@@ -141,7 +141,7 @@ void SetupParseFunctor::operator()(std::string S) {
                      << qf.getVert() << endl;
         break;
       default:
-        chancfg_cat->debug() << "  FOV is of an unknown type (" << qf.getType()
+        chancfg_cat->debug() << "  FOV is of an unknown type (" << (int)qf.getType()
                  << ")" << endl;
     }
     switch (s.getOrientation()) {
@@ -159,7 +159,7 @@ void SetupParseFunctor::operator()(std::string S) {
         break;
       default:
         chancfg_cat->debug() << "  setup has an unknown orientation ("
-                    << s.getOrientation() << ")" << endl;
+                    << (int)s.getOrientation() << ")" << endl;
     }
   }
   (*SetupDB)[sym] = s;

+ 1 - 1
panda/src/chancfg/chanwindow.I

@@ -98,7 +98,7 @@ INLINE int WindowItem::getCameraGroup(int display_region) const {
 }
 INLINE int WindowItem::getNumCameraGroups(void) const {
  int largestIndex=0;
- for(int j=0;j<_camera_group.size();j++)
+ for(size_t j=0;j<_camera_group.size();j++)
   if(_camera_group[j]>largestIndex)largestIndex=_camera_group[j];
  return largestIndex+1;
 }

+ 1 - 1
panda/src/chancfg/chanwindow.cxx

@@ -82,7 +82,7 @@ void WindowParseFunctor::operator()(std::string S) {
            //0 based.  We don't know yet how much room we actually need
            //as the information is in the un-analyzed layout.  cameraGroup
            //and sv are handled the same in this manner.
-           while(sv.size()<region_number+1) {
+           while((int)sv.size() < region_number+1) {
              sv.push_back("");
              cameraGroup.push_back(0);
            }