Alain Vaucher
46dcdc3ea2
Add missing include directive
2017-11-08 07:08:59 -08:00
Dan Ibanez
11607eb5bf
fix some warnings in public headers ( #486 )
...
* fix two compile warnings in public headers
both warnings have to do with variable
name shadowing
2017-04-03 13:32:35 -05:00
Andrew
c5457e1c6a
Make YAML::detail::iterator_base comparison operators const ( #472 )
2017-03-02 08:06:17 -08:00
butataatawa
f82861001a
Fix sequence sometimes not turning into a map ( #450 )
...
Previously, just referencing the next element in the sequence (and so constructing it, as an undefined element) would allow you to skip defining an element without turning the sequence into a map. E.g:
node[0] = "foo"; // sequence of size 1
node[1]; // sequence of size 1, with an undefined element at 1
node[2] = "bar"; // FIX: should be map of size 2 (since there's no element at index 1)
2017-01-02 15:44:22 -06:00
butataatawa
147d909fe6
Fix inconsistent Node::size when removing a key with unassigned node ( #327 ) ( #449 )
2016-12-06 08:40:00 -06:00
Jesse Beder
b5b03bb9ad
Run clang-format.
2016-10-12 00:00:39 -05:00
c0nk
f0b15cd6a0
Change node_map type from map<ptr,ptr> to vector<pair<ptr,ptr>> ( #386 )
...
* Change node_map type from map<ptr,ptr> to vector<pair<ptr,ptr>>
Map nodes are now iterated over in document order.
* Change insert_map_pair to always append
Always append in insert_map_pair even if the key is already present.
This breaks the behavior of force_insert which now always inserts KVs
even if the key is already present. The first insert for duplicated keys
now takes precedence for lookups.
2016-07-18 08:54:10 -05:00
Jesse Beder
883a1e8540
Revert "Add missing include."
...
Reason: broken build.
This reverts commit 0d810ad6d5 .
2016-04-01 20:18:11 -05:00
Tatsuyuki Ishi
0d810ad6d5
Add missing include.
2016-04-01 20:11:01 -05:00
Jesse Beder
dfbb388409
Remove unnecessary forward declaration.
2016-01-30 17:36:47 -06:00
Matt Blair
24fa1b3380
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
2016-01-10 22:44:15 -05:00
Haydn Trigg
03d6e7d672
Removed boost requirement from memory.h (detail)
...
Removed the boost requirement from memory.h using the shared_memory type defined in ptr.h
2015-07-25 11:45:10 +09:30
Jesse Beder
5c390e8d6c
Merge pull request #303 from bdutro/patch-1-squashed
...
Fix compiler error by updating node_data::remove to use new equals() method.
2015-04-08 13:59:56 -05:00
bdutro
aa928b925b
Update node_data::remove to use new equals() method
...
- Update the call to equals() in node_data::remove() to match the new implementation
- Add unit test for node::remove() to catch this type of bug in the future
2015-04-08 13:41:59 -05:00
Oliver Hamlet
ec8aa4fa62
More useful error messages.
...
Applied the patch given in jbeder/yaml-cpp#200 with the correct code
style.
2015-04-02 20:50:11 +01:00
Jesse Beder
7092a0b099
Fixed linker error on Visual Studio with a shared lib by moving the static methods node_data::equals to an instance method on node.
2015-03-29 21:11:53 -05:00
Jesse Beder
1025f76df1
Fix memory leak when accessing a const Node with a key that doesn't exist.
2015-01-24 17:22:45 -06:00
Jesse Beder
1006bee48a
Default-initialize all sub-iterators in node_iterator_base
2015-01-24 16:23:35 -06:00
Jesse Beder
0c280724e9
Add flow/block style setting on Nodes
2015-01-24 13:11:43 -06:00
Jesse Beder
13130ec20d
clang-format
2014-03-25 00:11:17 -05:00
Jesse Beder
066359802b
Merge from core, and update several missing DLL exports. This does not resolve them all (in particular, node_data::equals seems to be still missing, even though it is inlined in a header, which seems strange).
2014-03-24 00:31:43 -05:00
Jesse Beder
4b40441cee
Run IWYU
2014-03-22 23:14:48 -05:00
Jesse Beder
c7567b7b07
Add missing includes to node_data.h
2014-03-22 19:32:53 -05:00
Jesse Beder
d63ec48c8a
Run clang-format
2014-03-22 13:05:03 -05:00
Jesse Beder
5dbcf7eeb1
Fix conversion for C-strings (both literals and normal C-strings) so it compiles on Visual Studio.
2013-04-01 22:25:53 -05:00
Jesse Beder
f5418306d6
Explicity disallow get_idx for boolean type, to avoid ambiguity with a map.
2013-04-01 22:06:09 -05:00
Jesse Beder
09b4706faf
Added force_insert for mapping nodes that doesn't check to see if the key exists already (so it could duplicate keys)
2012-10-31 19:08:09 -05:00
Jesse Beder
c22512649e
Copied all files from new-api branch of old repo
2012-05-19 15:34:02 -05:00
Jesse Beder
1723523c43
Removed the new API from the default branch
2012-01-20 23:50:39 -06:00
Jesse Beder
5b32d89222
Fixed compiler error in iterator_base friend forward declaration in node on clang (and I hope MSVC), plus warnings on clang
2012-01-07 01:42:21 -06:00
Jesse Beder
5abfbf5aac
Added (unspecified-type) bool conversions for Node (new API)
2011-11-13 16:05:42 -06:00
Jesse Beder
0987b234c3
Added tags to Node
2011-09-13 14:00:47 -05:00
Jesse Beder
2dfccbb945
Added a convert<> specialization for YAML::_Null (so you can say node[YAML::Null])
2011-09-13 02:03:56 -05:00
Jesse Beder
0c321a6dc6
Switched the node_ref to *always* create its data (since now the Node itself doesn't always create itself)
2011-09-12 22:03:11 -05:00
Jesse Beder
5397a93702
Implemented std::map decode (and fixed bug in the Node iterator - the reference_type should be just a plain value, since it's created on-the-fly)
2011-09-12 00:29:39 -05:00
Jesse Beder
f22f38f7f2
Added reading/writing std::vector
2011-09-11 23:14:52 -05:00
Jesse Beder
f9d826c22a
Added mutable operator[] for integral types (you can only grow the sequence if you specify the *next* element)
2011-09-11 22:51:49 -05:00
Jesse Beder
4770ec798c
Implemented operator[] specialization, but only const (should the sequence be mutable?)
2011-09-11 21:51:04 -05:00
Jesse Beder
4568dd0b19
Started specialization for operator[] for integers
2011-09-11 21:32:47 -05:00
Jesse Beder
a308b73e8a
Set the map iterator to filter over undefined items
2011-09-11 19:44:27 -05:00
Jesse Beder
a03af5dd73
Implemented the map size computation
2011-09-11 17:16:26 -05:00
Jesse Beder
b50264e74d
Switched the implementation of maps from list<pair> to map (but just pointer comparison)
2011-09-11 16:56:38 -05:00
Jesse Beder
ecdd9cc66d
Added computing and caching the sequence size
2011-09-11 16:21:36 -05:00
Jesse Beder
2d81e46655
Added dependency management (to cause nodes to become defined if their children do)
2011-09-11 15:59:53 -05:00
Jesse Beder
0d1b5224c8
Major switch from Value -> Node. The library compiles with the new API, but tests are still oldies, and don't compile
2011-09-10 17:57:23 -05:00
Jesse Beder
ac81d7c883
Start of moving Value -> Node and Node -> old API Node (with a #define toggle)
2011-09-10 17:18:15 -05:00