RFA: src/NewField Changes

Jeffrey Oldham oldham at codesourcery.com
Thu Mar 29 00:01:30 UTC 2001


In the continuing pursuit to compile a "hello, world" Pooma program
using g++, here are more changes.

OK to commit?

2001-03-28  Jeffrey D. Oldham  <oldham at codesourcery.com>

	* PrintField.h (PrintField::PrintField): Reorder constructor
	initializers to reflect class member order.
	* Updater/UpdaterList.h (UpdaterListData::UpdaterListData):
	Likewise.  Also add default initializer for base class.
	(UpdaterListData::~UpdaterListData): Change loop iterator type to
	correspond to std::vector.

Tested on	sequential Linux using gcc 3.1 by compiling Pooma library
Approved by	???you???

Thanks,
Jeffrey D. Oldham
oldham at codesourcery.com
-------------- next part --------------
Index: PrintField.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/NewField/PrintField.h,v
retrieving revision 1.2
diff -c -p -r1.2 PrintField.h
*** PrintField.h	2000/07/20 21:03:51	1.2
--- PrintField.h	2001/03/28 23:52:50
*************** public:
*** 188,194 ****
  	     bool scientific = false, int spacing = 1)
      : domainwidth_m(domainWidth), datawidth_m(dataWidth), 
        dataprecision_m(dataPrecision), carreturn_m(carReturn),
!       scientific_m(scientific), spacing_m(spacing)
      {
        PAssert(domainwidth_m > 0);
        PAssert(datawidth_m > 0);
--- 188,194 ----
  	     bool scientific = false, int spacing = 1)
      : domainwidth_m(domainWidth), datawidth_m(dataWidth), 
        dataprecision_m(dataPrecision), carreturn_m(carReturn),
!       spacing_m(spacing), scientific_m(scientific)
      {
        PAssert(domainwidth_m > 0);
        PAssert(datawidth_m > 0);
Index: Updater/UpdaterList.h
===================================================================
RCS file: /home/pooma/Repository/r2/src/NewField/Updater/UpdaterList.h,v
retrieving revision 1.7
diff -c -p -r1.7 UpdaterList.h
*** Updater/UpdaterList.h	2001/02/21 20:11:38	1.7
--- Updater/UpdaterList.h	2001/03/28 23:52:50
*************** public:
*** 66,73 ****
    // Copy constructor.
  
    UpdaterListData(const UpdaterListData &model)
!     : data_m(model.data_m),
!       updating_m(false)
    { }
    
    
--- 66,72 ----
    // Copy constructor.
  
    UpdaterListData(const UpdaterListData &model)
!     : RefCounted (), updating_m(false), data_m(model.data_m)
    { }
    
    
*************** public:
*** 88,94 ****
  
    ~UpdaterListData() 
      {
!       for (int i = 0; i < data_m.size(); i++)
          delete data_m[i]; 
      }
  
--- 87,93 ----
  
    ~UpdaterListData() 
      {
!       for (size_type i = 0; i < data_m.size(); i++)
          delete data_m[i]; 
      }
  
*************** private:
*** 139,144 ****
--- 138,144 ----
    mutable bool updating_m;
  
    std::vector<UpdaterListItem *> data_m;
+   typedef std::vector<UpdaterListItem *>::size_type size_type;
  };
  
  


More information about the pooma-dev mailing list