Update of /cvsroot/playerstage/code/player/server/drivers/mixed/cmucam2
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10946/server/drivers/mixed/cmucam2

Modified Files:
        .cvsignore cmucam2.cc 
Log Message:
applied Toby's patch to replace fixed-size arrays

Index: .cvsignore
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/cmucam2/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** .cvsignore  17 Sep 2007 02:18:55 -0000      1.2
--- .cvsignore  1 Nov 2007 22:16:20 -0000       1.3
***************
*** 4,5 ****
--- 4,7 ----
  *.la
  *.a
+ .libs
+ *.lo

Index: cmucam2.cc
===================================================================
RCS file: 
/cvsroot/playerstage/code/player/server/drivers/mixed/cmucam2/cmucam2.cc,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** cmucam2.cc  23 Aug 2007 19:58:45 -0000      1.19
--- cmucam2.cc  1 Nov 2007 22:16:20 -0000       1.20
***************
*** 130,134 ****
                int num_of_blobs;
                const char* devicepath;
!               color_config color[PLAYER_BLOBFINDER_MAX_BLOBS];
  
                // Blobfinder interface (provides)
--- 130,134 ----
                int num_of_blobs;
                const char* devicepath;
!               color_config *color;
  
                // Blobfinder interface (provides)
***************
*** 161,164 ****
--- 161,165 ----
                //
                Cmucam2( ConfigFile* cf, int section);
+               ~Cmucam2();
  
                // Process incoming messages from clients 
***************
*** 237,240 ****
--- 238,242 ----
                char variable[20];
  
+               color = new color_config[num_of_blobs];
                for (int i = 0; i < num_of_blobs; i++)
                {
***************
*** 250,253 ****
--- 252,256 ----
        else
        {
+               color = new color_config[1];
                num_of_blobs = 0;
                color[0].rmin = 0; color[0].rmax = 0;
***************
*** 266,270 ****
        }
  }
!     
  
////////////////////////////////////////////////////////////////////////////////
  int Cmucam2::Setup()
--- 269,278 ----
        }
  }
! 
! Cmucam2::~Cmucam2()
! {
!       delete [] color;
! }
! 
  
////////////////////////////////////////////////////////////////////////////////
  int Cmucam2::Setup()
***************
*** 441,444 ****
--- 449,453 ----
        blobfinder_data.height      = IMAGE_HEIGHT;
        blobfinder_data.blobs_count = num_of_blobs;
+       blobfinder_data.blobs       = new player_blobfinder_blob_t 
[blobfinder_data.blobs_count];
  
        blobs_observed = 0;
***************
*** 466,469 ****
--- 475,479 ----
                         PLAYER_BLOBFINDER_DATA_BLOBS, &blobfinder_data, 
                         sizeof (player_blobfinder_data), NULL);
+       delete [] blobfinder_data.blobs;
        return;
  }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to