simplify copy c'tor

This commit is contained in:
Oswald Buddenhagen
2011-04-04 18:17:08 +02:00
parent 63d5dbd9ac
commit 0cf7dbd816

View File

@@ -81,9 +81,7 @@ public:
private: private:
struct BlockScope { struct BlockScope {
BlockScope() : start(0), braceLevel(0), special(false), inBranch(false) {} BlockScope() : start(0), braceLevel(0), special(false), inBranch(false) {}
BlockScope(BlockScope &other) : BlockScope(const BlockScope &other) { *this = other; }
start(other.start), braceLevel(other.braceLevel),
special(other.special), inBranch(other.inBranch) {}
ushort *start; // Where this block started; store length here ushort *start; // Where this block started; store length here
int braceLevel; // Nesting of braces in scope int braceLevel; // Nesting of braces in scope
bool special; // Single-line conditionals inside loops, etc. cannot have else branches bool special; // Single-line conditionals inside loops, etc. cannot have else branches