mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 12:41:17 +00:00
Modernize: Use "using" instead of "typedef" (#754)
This commit is contained in:

committed by
Jesse Beder

parent
0fddd1e5bd
commit
6e87b37034
@@ -66,7 +66,7 @@ static const unsigned char decoding[] = {
|
||||
};
|
||||
|
||||
std::vector<unsigned char> DecodeBase64(const std::string &input) {
|
||||
typedef std::vector<unsigned char> ret_type;
|
||||
using ret_type = std::vector<unsigned char>;
|
||||
if (input.empty())
|
||||
return ret_type();
|
||||
|
||||
|
@@ -61,11 +61,11 @@ class NodeBuilder : public EventHandler {
|
||||
detail::shared_memory_holder m_pMemory;
|
||||
detail::node* m_pRoot;
|
||||
|
||||
typedef std::vector<detail::node*> Nodes;
|
||||
using Nodes = std::vector<detail::node *>;
|
||||
Nodes m_stack;
|
||||
Nodes m_anchors;
|
||||
|
||||
typedef std::pair<detail::node*, bool> PushedKey;
|
||||
using PushedKey = std::pair<detail::node*, bool>;
|
||||
std::vector<PushedKey> m_keys;
|
||||
std::size_t m_mapDepth;
|
||||
};
|
||||
|
@@ -45,7 +45,7 @@ class NodeEvents {
|
||||
anchor_t _CreateNewAnchor() { return ++m_curAnchor; }
|
||||
|
||||
private:
|
||||
typedef std::map<const detail::node_ref*, anchor_t> AnchorByIdentity;
|
||||
using AnchorByIdentity = std::map<const detail::node_ref*, anchor_t>;
|
||||
AnchorByIdentity m_anchorByIdentity;
|
||||
|
||||
anchor_t m_curAnchor;
|
||||
@@ -60,7 +60,7 @@ class NodeEvents {
|
||||
detail::shared_memory_holder m_pMemory;
|
||||
detail::node* m_root;
|
||||
|
||||
typedef std::map<const detail::node_ref*, int> RefCount;
|
||||
using RefCount = std::map<const detail::node_ref*, int>;
|
||||
RefCount m_refCount;
|
||||
};
|
||||
} // namespace YAML
|
||||
|
@@ -95,7 +95,7 @@ class SettingChanges {
|
||||
}
|
||||
|
||||
private:
|
||||
typedef std::vector<std::unique_ptr<SettingChangeBase>> setting_changes;
|
||||
using setting_changes = std::vector<std::unique_ptr<SettingChangeBase> >;
|
||||
setting_changes m_settingChanges;
|
||||
};
|
||||
} // namespace YAML
|
||||
|
@@ -59,7 +59,7 @@ class SingleDocParser {
|
||||
const Directives& m_directives;
|
||||
std::unique_ptr<CollectionStack> m_pCollectionStack;
|
||||
|
||||
typedef std::map<std::string, anchor_t> Anchors;
|
||||
using Anchors = std::map<std::string, anchor_t>;
|
||||
Anchors m_anchors;
|
||||
|
||||
anchor_t m_curAnchor;
|
||||
|
@@ -189,7 +189,7 @@ Stream::Stream(std::istream& input)
|
||||
m_pPrefetched(new unsigned char[YAML_PREFETCH_SIZE]),
|
||||
m_nPrefetchedAvailable(0),
|
||||
m_nPrefetchedUsed(0) {
|
||||
typedef std::istream::traits_type char_traits;
|
||||
using char_traits = std::istream::traits_type;
|
||||
|
||||
if (!input)
|
||||
return;
|
||||
|
Reference in New Issue
Block a user