Index: translator/GenPoly/FindFunction.cc
===================================================================
--- translator/GenPoly/FindFunction.cc	(revision 51587aa493cba4720a447024fed1e9d94b78524a)
+++ translator/GenPoly/FindFunction.cc	(revision a08ba927e920255639a48d814cce47347723392a)
@@ -5,18 +5,12 @@
 // file "LICENCE" distributed with Cforall.
 //
-// XXX.cc -- 
+// FindFunction.cc -- 
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : 
-// Last Modified On : 
-// Update Count     : 0
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Tue May 19 07:35:48 2015
+// Update Count     : 1
 //
-/*
- * This file is part of the Cforall project
- *
- * $Id: FindFunction.cc,v 1.5 2005/08/29 20:14:13 rcbilson Exp $
- *
- */
 
 #include "FindFunction.h"
@@ -26,80 +20,66 @@
 
 namespace GenPoly {
+	class FindFunction : public Mutator {
+	  public:
+		FindFunction( std::list< FunctionType* > &functions, const TyVarMap &tyVars, bool replaceMode, FindFunctionPredicate predicate );
+  
+		virtual Type *mutate( FunctionType *functionType );
+		virtual Type *mutate( PointerType *pointerType );
+	  private:
+		void handleForall( const std::list< TypeDecl* > &forall );
 
-class FindFunction : public Mutator
-{
-public:
-  FindFunction( std::list< FunctionType* > &functions, const TyVarMap &tyVars, bool replaceMode, FindFunctionPredicate predicate );
-  
-  virtual Type *mutate( FunctionType *functionType );
-  virtual Type *mutate( PointerType *pointerType );
-  
-private:
-  void handleForall( const std::list< TypeDecl* > &forall );
+		std::list< FunctionType* > &functions;
+		TyVarMap tyVars;
+		bool replaceMode;
+		FindFunctionPredicate predicate;
+	};
 
-  std::list< FunctionType* > &functions;
-  TyVarMap tyVars;
-  bool replaceMode;
-  FindFunctionPredicate predicate;
-};
+	void findFunction( Type *type, std::list< FunctionType* > &functions, const TyVarMap &tyVars, FindFunctionPredicate predicate ) {
+		FindFunction finder( functions, tyVars, false, predicate );
+		type->acceptMutator( finder );
+	}
 
-void
-findFunction( Type *type, std::list< FunctionType* > &functions, const TyVarMap &tyVars, FindFunctionPredicate predicate )
-{
-  FindFunction finder( functions, tyVars, false, predicate );
-  type->acceptMutator( finder );
-}
+	void findAndReplaceFunction( Type *&type, std::list< FunctionType* > &functions, const TyVarMap &tyVars, FindFunctionPredicate predicate ) {
+		FindFunction finder( functions, tyVars, true, predicate );
+		type = type->acceptMutator( finder );
+	}
 
-void
-findAndReplaceFunction( Type *&type, std::list< FunctionType* > &functions, const TyVarMap &tyVars, FindFunctionPredicate predicate )
-{
-  FindFunction finder( functions, tyVars, true, predicate );
-  type = type->acceptMutator( finder );
-}
+	FindFunction::FindFunction( std::list< FunctionType* > &functions, const TyVarMap &tyVars, bool replaceMode, FindFunctionPredicate predicate )
+		: functions( functions ), tyVars( tyVars ), replaceMode( replaceMode ), predicate( predicate ) {
+	}
 
-FindFunction::FindFunction( std::list< FunctionType* > &functions, const TyVarMap &tyVars, bool replaceMode, FindFunctionPredicate predicate )
-  : functions( functions ), tyVars( tyVars ), replaceMode( replaceMode ), predicate( predicate )
-{
-}
+	void FindFunction::handleForall( const std::list< TypeDecl* > &forall ) {
+		for ( std::list< TypeDecl* >::const_iterator i = forall.begin(); i != forall.end(); ++i ) {
+			TyVarMap::iterator var = tyVars.find( (*i)->get_name() );
+			if ( var != tyVars.end() ) {
+				tyVars.erase( var );
+			} // if
+		} // for
+	}
 
-void
-FindFunction::handleForall( const std::list< TypeDecl* > &forall )
-{
-  for ( std::list< TypeDecl* >::const_iterator i = forall.begin(); i != forall.end(); ++i ) {
-    TyVarMap::iterator var = tyVars.find( (*i)->get_name() );
-    if ( var != tyVars.end() ) {
-      tyVars.erase( var );
-    }
-  }
-}
+	Type * FindFunction::mutate( FunctionType *functionType ) {
+		TyVarMap oldTyVars = tyVars;
+		handleForall( functionType->get_forall() );
+		mutateAll( functionType->get_returnVals(), *this );
+		Type *ret = functionType;
+		if ( predicate( functionType, tyVars ) ) {
+			functions.push_back( functionType );
+			if ( replaceMode ) {
+				ret = new FunctionType( Type::Qualifiers(), true );
+			} // if
+		} // if
+		tyVars = oldTyVars;
+		return ret;
+	}
 
-Type* 
-FindFunction::mutate( FunctionType *functionType )
-{
-  TyVarMap oldTyVars = tyVars;
-  handleForall( functionType->get_forall() );
-  mutateAll( functionType->get_returnVals(), *this );
-  Type *ret = functionType;
-  if ( predicate( functionType, tyVars ) ) {
-    functions.push_back( functionType );
-    if ( replaceMode ) {
-      ret = new FunctionType( Type::Qualifiers(), true );
-    }
-  }
-  tyVars = oldTyVars;
-  return ret;
-}
+	Type * FindFunction::mutate( PointerType *pointerType ) {
+		TyVarMap oldTyVars = tyVars;
+		handleForall( pointerType->get_forall() );
+		Type *ret = Mutator::mutate( pointerType );
+		tyVars = oldTyVars;
+		return ret;
+	}
+} // namespace GenPoly
 
-Type *
-FindFunction::mutate( PointerType *pointerType )
-{
-  TyVarMap oldTyVars = tyVars;
-  handleForall( pointerType->get_forall() );
-  Type *ret = Mutator::mutate( pointerType );
-  tyVars = oldTyVars;
-  return ret;
-}
-
-} // namespace GenPoly
 // Local Variables: //
 // tab-width: 4 //
