Reorder enum. Add enum constant for the size, fix a wrong condition in an assert.
git-svn-id: http://root.cern.ch/svn/root/trunk@49320 27541ba8-7e3a-0410-8455-c3a389f83636
This commit is contained in:
parent
fc0f602a9e
commit
343a649e42
@ -117,10 +117,11 @@ namespace cling {
|
||||
enum State {
|
||||
kCollecting,
|
||||
kCompleted,
|
||||
kCommitting,
|
||||
kRolledBack,
|
||||
kRolledBackWithErrors,
|
||||
kCommitting,
|
||||
kCommitted
|
||||
kCommitted,
|
||||
kNumStates
|
||||
};
|
||||
|
||||
enum IssuedDiags {
|
||||
|
@ -74,7 +74,7 @@ namespace cling {
|
||||
}
|
||||
|
||||
void Transaction::erase(size_t pos) {
|
||||
assert(empty() && "Erasing from an empty transaction.");
|
||||
assert(!empty() && "Erasing from an empty transaction.");
|
||||
m_DeclQueue->erase(decls_begin() + pos);
|
||||
}
|
||||
|
||||
@ -129,12 +129,12 @@ namespace cling {
|
||||
}
|
||||
|
||||
void Transaction::printStructure(size_t nindent) const {
|
||||
static const char* const stateNames[] = {
|
||||
static const char* const stateNames[kNumStates] = {
|
||||
"Collecting",
|
||||
"kCompleted",
|
||||
"Committing",
|
||||
"RolledBack",
|
||||
"RolledBackWithErrors",
|
||||
"Committing",
|
||||
"Committed"
|
||||
};
|
||||
std::string indent(nindent, ' ');
|
||||
|
Loading…
x
Reference in New Issue
Block a user