forked from jasder/antlr
Style changes for main antlr4 codebase
- Add "explicit" to Interval(size_t, size_t) constructor. - Change an IntervalSet constructor to delegate part of the construction - Add "explicit" to Interval(size_t, size_t) constructor. - Change an IntervalSet constructor to delegate part of the construction
This commit is contained in:
parent
0f6082eb15
commit
3041b8e012
|
@ -26,7 +26,7 @@ namespace misc {
|
|||
ssize_t b;
|
||||
|
||||
Interval();
|
||||
Interval(size_t a_, size_t b_); // For unsigned -> signed mappings.
|
||||
explicit Interval(size_t a_, size_t b_); // For unsigned -> signed mappings.
|
||||
Interval(ssize_t a_, ssize_t b_);
|
||||
|
||||
/// return number of elements between a and b inclusively. x..x is length 1.
|
||||
|
|
|
@ -21,7 +21,8 @@ IntervalSet const IntervalSet::EMPTY_SET;
|
|||
IntervalSet::IntervalSet() : _intervals() {
|
||||
}
|
||||
|
||||
IntervalSet::IntervalSet(const IntervalSet &set) : _intervals(set._intervals) {
|
||||
IntervalSet::IntervalSet(const IntervalSet &set) : IntervalSet() {
|
||||
_intervals = set._intervals;
|
||||
}
|
||||
|
||||
IntervalSet::IntervalSet(IntervalSet&& set) : IntervalSet(std::move(set._intervals)) {
|
||||
|
|
Loading…
Reference in New Issue