Michael Welsh Duggan and Jesse Beder
320b02b14a
Allow using a Node as the key in force_insert.
...
Node::force_insert() uses convert<> to convert its key to a node.
Add a specialization for convert<Node>.
2015-11-22 11:21:08 -06:00
Jonathan Hamilton
b426fafff6
Fix some Node::operator[] regressions from 0.5.1
...
"const Node Node::operator[](const Key& key) const" changed from
returning new empty node if the key was missing in 0.5.1 to returning
a shared 'zombie' node in 0.5.2 to resolve a memory leak.
(Specifically 1025f76df1 was where this
was introduced)
This caused some regressions where this 'zombie' object threw exceptions
in some functions where the 'empty' object would not.
This change fixes the Node::as(fallback) method (to return the
'fallback' instead of throwing an exception) and the
Node::begin()/Node::end() methods to return default-constructed
iterators (so begin() == end() in such cases) instead of another
exception.
2015-06-08 11:47:10 -07:00
bdutro and Brett Dutro
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
Jesse Beder
25b2ed0787
Fix operator bool() exception on zombie node
2015-03-29 14:31:22 -05:00
Jesse Beder
67e37d000a
Merge from core
2015-02-21 12:34:19 -06:00
Jesse Beder
b1322770c2
Remove the extraneous gtest library from the test's link args, since gmock covers it
2015-02-21 12:33:36 -06:00
Jesse Beder
39e7b651dc
Fix test that depended on the order of map outputs
2015-02-21 12:14:53 -06:00
Jesse Beder
f9ff72dee7
Add test for an empty string not being null
2015-01-24 17:30:12 -06:00
Jesse Beder
899b6614c1
Merge from core
2015-01-24 16:07:36 -06:00
Jesse Beder
bc86fd4aec
Force null to be quoted if written as a string
2015-01-24 16:07:10 -06:00
Jesse Beder
c9729b26a4
Remove stray 'auto' that leaked in without C++11
2015-01-24 15:34:39 -06:00
Jesse Beder
c324bf8a7d
Merge core
2015-01-24 14:47:29 -06:00
Jesse Beder
891c7338bf
Add test to CMake config
2015-01-24 14:45:40 -06:00
Jesse Beder
391111c055
Merge core
2015-01-24 14:40:55 -06:00
Jesse Beder
570ab9d3fb
Fix unused arg warnings for EmitterStyle
2015-01-24 14:39:17 -06:00
Jesse Beder
9eae039c91
Merge
2015-01-24 13:24:08 -06:00
Jesse Beder
0c280724e9
Add flow/block style setting on Nodes
2015-01-24 13:11:43 -06:00
Jesse Beder
9880b608b9
Merge from core
2015-01-24 12:26:16 -06:00
Jesse Beder
ad712c4f2d
Add EmitterStyle, which will allow sequence or map style (i.e., flow or block) to be preserved between parsing and emitting
2015-01-24 12:19:20 -06:00
Jesse Beder
2c340f0546
Fixed memory corruption when using a node as a key
2014-08-16 10:52:51 -05:00
Jesse Beder
1aa25e7679
Wrap the #pragma warning for msvc in an ifdef
2014-03-25 22:08:34 -05:00
Jesse Beder
13130ec20d
clang-format
2014-03-25 00:11:17 -05:00
Jesse Beder
dea3428ce0
Merge from core
2014-03-25 00:07:38 -05:00
Jesse Beder
e0b293e757
Add test and util sources to make format
2014-03-25 00:02:16 -05:00
Jesse Beder
a4a79835c9
Suppress gtest warnings on xcode
2014-03-24 23:47:46 -05:00