src/HumdrumFileContent-accidental.cpp
void HumdrumFileContent::fillKeySignature(vector<int>& states,
		const string& keysig) {
	std::fill(states.begin(), states.end(), 0);
	if (keysig.find("f#") != string::npos) { states[3] = +1; }
	if (keysig.find("c#") != string::npos) { states[0] = +1; }
	if (keysig.find("g#") != string::npos) { states[4] = +1; }
	if (keysig.find("d#") != string::npos) { states[1] = +1; }
	if (keysig.find("a#") != string::npos) { states[5] = +1; }
	if (keysig.find("e#") != string::npos) { states[2] = +1; }
	if (keysig.find("b#") != string::npos) { states[6] = +1; }
	if (keysig.find("b-") != string::npos) { states[6] = -1; }
	if (keysig.find("e-") != string::npos) { states[2] = -1; }
	if (keysig.find("a-") != string::npos) { states[5] = -1; }
	if (keysig.find("d-") != string::npos) { states[1] = -1; }
	if (keysig.find("g-") != string::npos) { states[4] = -1; }
	if (keysig.find("c-") != string::npos) { states[0] = -1; }
	if (keysig.find("f-") != string::npos) { states[3] = -1; }
}
//////////////////////////////
//
// HumdrumFileContent::fillKeySignature -- Read key signature notes and
//    assign +1 to sharps, -1 to flats in the diatonic input array.  Used
//    only by HumdrumFileContent::analyzeKernAccidentals().
//
:fillKeySignature -- Read key signature notes and
assign +1 to sharps, -1 to flats in the diatonic input array.
: fillKeySignature -- Read key signature notes and assign + 1 to sharps - 1 to flats in the diatonic input array .
void HumdrumFileContent::fillKeySignature(vector<int>& states,
		const string& keysig) {
	std::fill(states.begin(), states.end(), 0);
	if (keysig.find("f#") != string::npos) { states[3] = +1; }
	if (keysig.find("c#") != string::npos) { states[0] = +1; }
	if (keysig.find("g#") != string::npos) { states[4] = +1; }
	if (keysig.find("d#") != string::npos) { states[1] = +1; }
	if (keysig.find("a#") != string::npos) { states[5] = +1; }
	if (keysig.find("e#") != string::npos) { states[2] = +1; }
	if (keysig.find("b#") != string::npos) { states[6] = +1; }
	if (keysig.find("b-") != string::npos) { states[6] = -1; }
	if (keysig.find("e-") != string::npos) { states[2] = -1; }
	if (keysig.find("a-") != string::npos) { states[5] = -1; }
	if (keysig.find("d-") != string::npos) { states[1] = -1; }
	if (keysig.find("g-") != string::npos) { states[4] = -1; }
	if (keysig.find("c-") != string::npos) { states[0] = -1; }
	if (keysig.find("f-") != string::npos) { states[3] = -1; }
}
void HumdrumFileContent :: fillKeySignature ( vector < int > & states , const string & keysig ) { std :: fill ( states . begin ( ) , states . end ( ) , 0 ) ; if ( keysig . find ( " " ) != string :: npos ) { states [ 3 ] = +1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 0 ] = +1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 4 ] = +1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 1 ] = +1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 5 ] = +1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 2 ] = +1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 6 ] = +1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 6 ] = -1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 2 ] = -1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 5 ] = -1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 1 ] = -1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 4 ] = -1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 0 ] = -1 ; } if ( keysig . find ( " " ) != string :: npos ) { states [ 3 ] = -1 ; } }
HumdrumFileContent::fillKeySignature -- Read key signature notes and
assign +1 to sharps, -1 to flats in the diatonic input array.
HumdrumFileContent :: fillKeySignature -- Read key signature notes and assign + 1 to sharps - 1 to flats in the diatonic input array .