Skip to content

Commit

Permalink
Assure -> Ensure
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg68 committed Jan 20, 2024
1 parent f90cc43 commit e8acb37
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/grandorgue/combinations/model/GOCombination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ GOCombination::GOCombination(
GOCombination::~GOCombination() {}

void GOCombination::Clear() {
AssureElementStatesAllocated();
EnsureElementStatesAllocated();
for (unsigned i = 0; i < m_ElementStates.size(); i++)
m_ElementStates[i] = -1;
m_IsFull = false;
Expand All @@ -50,7 +50,7 @@ void GOCombination::Clear() {
void GOCombination::Copy(GOCombination *combination) {
assert(&m_Template == &combination->m_Template);
m_ElementStates = combination->m_ElementStates;
AssureElementStatesAllocated();
EnsureElementStatesAllocated();
}

bool GOCombination::IsEmpty() const {
Expand Down Expand Up @@ -232,7 +232,7 @@ void GOCombination::GetEnabledElements(
}
}

void GOCombination::AssureElementStatesAllocated() {
void GOCombination::EnsureElementStatesAllocated() {
unsigned defSize = r_ElementDefinitions.size();

if (m_ElementStates.size() > defSize)
Expand Down Expand Up @@ -385,7 +385,7 @@ bool GOCombination::FillWithCurrent(
GOSetterState::SetterType setterType, bool isToStoreInvisibleObjects) {
bool used = false;

AssureElementStatesAllocated();
EnsureElementStatesAllocated();
m_IsFull = isToStoreInvisibleObjects;
switch (setterType) {
case GOSetterState::SETTER_REGULAR:
Expand Down Expand Up @@ -442,7 +442,7 @@ bool GOCombination::Push(
setterState.m_SetterType, setterState.m_IsStoreInvisible);
}
} else {
AssureElementStatesAllocated();
EnsureElementStatesAllocated();
for (unsigned i = 0; i < r_ElementDefinitions.size(); i++) {
if (
m_ElementStates[i] != -1
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/combinations/model/GOCombination.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class GOCombination : public GOSaveableObject, public GOSaveableToYaml {
const std::vector<GOCombinationDefinition::Element> &r_ElementDefinitions;
bool m_Protected;

void AssureElementStatesAllocated();
void EnsureElementStatesAllocated();

// Read the NumberOfStops key from the given config source
unsigned ReadNumberOfStops(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void GODivisionalCombination::SaveInt(GOConfigWriter &cfg) {
unsigned tremulant_count = 0;
unsigned switch_count = 0;

AssureElementStatesAllocated();
EnsureElementStatesAllocated();
for (unsigned i = 0; i < r_ElementDefinitions.size(); i++) {
const GOCombinationDefinition::Element &e = r_ElementDefinitions[i];
int state = GetElementState(i);
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/combinations/model/GOGeneralCombination.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ void GOGeneralCombination::LoadCombinationInt(
}

void GOGeneralCombination::SaveInt(GOConfigWriter &cfg) {
AssureElementStatesAllocated();
EnsureElementStatesAllocated();

wxString buffer;
unsigned stop_count = 0;
Expand Down

0 comments on commit e8acb37

Please sign in to comment.