mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Replace Boost usage with C++11 features
- Adds 'std=c++11' compiler flags - Replaces boost::type_traits with std::type_traits - Replaces boost::shared_ptr with std::shared_ptr - Replaces std::auto_ptr with std::unique_ptr - Replaces raw pointers with std::unique_ptr in ptr_vector, ptr_stack, and SettingChanges - Replaces boost::noncopyable with deleted copy and assignment operators - Replaces boost::next with std::next - Replaces boost::enable_if with std::enable_if - Replaces boost::is_convertible with std::is_convertible - Replaces ptrdiff_t with std::ptrdiff_t - Replaces boost::iterator_facade and boost::iterator_adaptor with std::iterator, borrowing the 'proxy reference' technique from boost - Removes Boost dependency from CMakeLists - Formats changed files using clang-format
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <assert.h>
|
||||
#include <boost/smart_ptr/shared_ptr.hpp>
|
||||
#include <iterator>
|
||||
#include <sstream>
|
||||
|
||||
#include "yaml-cpp/exceptions.h"
|
||||
@@ -28,9 +28,7 @@ void node_data::mark_defined() {
|
||||
m_isDefined = true;
|
||||
}
|
||||
|
||||
void node_data::set_mark(const Mark& mark) {
|
||||
m_mark = mark;
|
||||
}
|
||||
void node_data::set_mark(const Mark& mark) { m_mark = mark; }
|
||||
|
||||
void node_data::set_type(NodeType::value type) {
|
||||
if (type == NodeType::Undefined) {
|
||||
@@ -104,7 +102,7 @@ void node_data::compute_seq_size() const {
|
||||
void node_data::compute_map_size() const {
|
||||
kv_pairs::iterator it = m_undefinedPairs.begin();
|
||||
while (it != m_undefinedPairs.end()) {
|
||||
kv_pairs::iterator jt = boost::next(it);
|
||||
kv_pairs::iterator jt = std::next(it);
|
||||
if (it->first->is_defined() && it->second->is_defined())
|
||||
m_undefinedPairs.erase(it);
|
||||
it = jt;
|
||||
|
Reference in New Issue
Block a user