Index: trunk/psModules/src/pmObjects.c
===================================================================
--- trunk/psModules/src/pmObjects.c	(revision 4770)
+++ trunk/psModules/src/pmObjects.c	(revision 4992)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-16 01:10:34 $
+ *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-09-11 22:25:39 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -491,13 +491,13 @@
 
 // XXX: Macro this.
-static bool isItInThisRegion(const psRegion *valid,
+static bool isItInThisRegion(const psRegion valid,
                              psS32 x,
                              psS32 y)
 {
 
-    if ((x >= valid->x0) &&
-            (x <= valid->x1) &&
-            (y >= valid->y0) &&
-            (y <= valid->y1)) {
+    if ((x >= valid.x0) &&
+            (x <= valid.x1) &&
+            (y >= valid.y0) &&
+            (y <= valid.y1)) {
         return(true);
     }
@@ -519,5 +519,5 @@
 psList *pmCullPeaks(psList *peaks,
                     psF32 maxValue,
-                    const psRegion *valid)
+                    const psRegion valid)
 {
     PS_ASSERT_PTR_NON_NULL(peaks, NULL);
@@ -531,6 +531,5 @@
         pmPeak *tmpPeak = (pmPeak *) tmpListElem->data;
         if ((tmpPeak->counts > maxValue) ||
-                ((valid != NULL) &&
-                 (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y)))) {
+                (true == isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))) {
             psListRemoveData(peaks, (psPtr) tmpPeak);
         }
@@ -545,5 +544,5 @@
 // XXX EAM: I changed this to return a new, subset array
 //          rather than alter the existing one
-psArray *pmPeaksSubset(psArray *peaks, psF32 maxValue, const psRegion *valid)
+psArray *pmPeaksSubset(psArray *peaks, psF32 maxValue, const psRegion valid)
 {
     PS_ASSERT_PTR_NON_NULL(peaks, NULL);
@@ -558,8 +557,6 @@
         if (tmpPeak->counts > maxValue)
             continue;
-        if (valid != NULL) {
-            if (isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))
-                continue;
-        }
+        if (isItInThisRegion(valid, tmpPeak->x, tmpPeak->y))
+            continue;
         psArrayAdd (output, 200, tmpPeak);
     }
