mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
refactor: simplify inclusion dependencies
This commit is contained in:
@@ -2,7 +2,6 @@
|
|||||||
// Distributed under the MIT License.
|
// Distributed under the MIT License.
|
||||||
#ifndef TOML11_REGION_HPP
|
#ifndef TOML11_REGION_HPP
|
||||||
#define TOML11_REGION_HPP
|
#define TOML11_REGION_HPP
|
||||||
#include "exception.hpp"
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -231,11 +230,10 @@ struct region final : public region_base
|
|||||||
|
|
||||||
region& operator+=(const region& other)
|
region& operator+=(const region& other)
|
||||||
{
|
{
|
||||||
if(this->begin() != other.begin() || this->end() != other.end() ||
|
// different regions cannot be concatenated
|
||||||
this->last_ != other.first_)
|
assert(this->begin() == other.begin() && this->end() == other.end() &&
|
||||||
{
|
this->last_ == other.first_);
|
||||||
throw internal_error("invalid region concatenation");
|
|
||||||
}
|
|
||||||
this->last_ = other.last_;
|
this->last_ = other.last_;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user