mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Apply formatting/style tweaks to comply with compile time diagnostics for g++ and clang++ (#686)
* Add compilation flags: -Wshadow -Weffc++ -pedantic -pedantic-errors * Delete implicit copy & move constructors & assignment operators in classes with pointer data members. * An exception to the above: Add default copy & move constructors & assignment operators for the Binary class. * Convert boolean RegEx operators to binary operators. * Initialize all members in all classes in ctors. * Let default ctor delegate to the converting ctor in Binary and RegEx * Don't change any tests except regex_test (as a result of the change to binary operators). Note: https://bugzilla.redhat.com/show_bug.cgi?id=1544675 makes -Weffc++ report a false positive in "include/yaml-cpp/node/impl.h".
This commit is contained in:
@@ -26,13 +26,17 @@ class Node;
|
||||
class NodeEvents {
|
||||
public:
|
||||
explicit NodeEvents(const Node& node);
|
||||
NodeEvents(const NodeEvents&) = delete;
|
||||
NodeEvents(NodeEvents&&) = delete;
|
||||
NodeEvents& operator=(const NodeEvents&) = delete;
|
||||
NodeEvents& operator=(NodeEvents&&) = delete;
|
||||
|
||||
void Emit(EventHandler& handler);
|
||||
|
||||
private:
|
||||
class AliasManager {
|
||||
public:
|
||||
AliasManager() : m_curAnchor(0) {}
|
||||
AliasManager() : m_anchorByIdentity{}, m_curAnchor(0) {}
|
||||
|
||||
void RegisterReference(const detail::node& node);
|
||||
anchor_t LookupAnchor(const detail::node& node) const;
|
||||
@@ -59,6 +63,6 @@ class NodeEvents {
|
||||
typedef std::map<const detail::node_ref*, int> RefCount;
|
||||
RefCount m_refCount;
|
||||
};
|
||||
}
|
||||
} // namespace YAML
|
||||
|
||||
#endif // NODE_NODEEVENTS_H_62B23520_7C8E_11DE_8A39_0800200C9A66
|
||||
|
Reference in New Issue
Block a user