src/GridSlice.cpp
void GridSlice::initializePartStaves(vector<MxmlPart>& partdata) {
	int i, j;
	if (this->size() > 0) {
		// strange that this should happen, but presume the data
		// needs to be deleted.
		for (int i=0; i<(int)this->size(); i++) {
			if (this->at(i)) {
				delete this->at(i);
				this->at(i) = NULL;
			}
		}
	}
	this->resize(partdata.size());

	for (i=0; i<(int)partdata.size(); i++) {
		this->at(i) = new GridPart;
		this->at(i)->resize(partdata[i].getStaffCount());
		for (j=0; j<(int)partdata[i].getStaffCount(); j++) {
			this->at(i)->at(j) = new GridStaff;
		}
	}
}
//////////////////////////////
//
// GridSlice::initializePartStaves -- Also initialize sides
//
:initializePartStaves -- Also initialize sides
: initializePartStaves -- Also initialize sides
void GridSlice::initializePartStaves(vector<MxmlPart>& partdata) {
	int i, j;
	if (this->size() > 0) {
		for (int i=0; i<(int)this->size(); i++) {
			if (this->at(i)) {
				delete this->at(i);
				this->at(i) = NULL;
			}
		}
	}
	this->resize(partdata.size());
	for (i=0; i<(int)partdata.size(); i++) {
		this->at(i) = new GridPart;
		this->at(i)->resize(partdata[i].getStaffCount());
		for (j=0; j<(int)partdata[i].getStaffCount(); j++) {
			this->at(i)->at(j) = new GridStaff;
		}
	}
}
void GridSlice :: initializePartStaves ( vector < MxmlPart > & partdata ) { int i , j ; if ( this -> size ( ) > 0 ) { for ( int i = 0 ; i < ( int ) this -> size ( ) ; i ++ ) { if ( this -> at ( i ) ) { delete this -> at ( i ) ; this -> at ( i ) = NULL ; } } } this -> resize ( partdata . size ( ) ) ; for ( i = 0 ; i < ( int ) partdata . size ( ) ; i ++ ) { this -> at ( i ) = new GridPart ; this -> at ( i ) -> resize ( partdata [ i ] . getStaffCount ( ) ) ; for ( j = 0 ; j < ( int ) partdata [ i ] . getStaffCount ( ) ; j ++ ) { this -> at ( i ) -> at ( j ) = new GridStaff ; } } }
GridSlice::initializePartStaves -- Also initialize sides
GridSlice :: initializePartStaves -- Also initialize sides
// strange that this should happen, but presume the data // needs to be deleted.