diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-09 11:26:08 +0200 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-04-09 11:26:08 +0200 |
commit | e11d3cdadc4619053f547c28cc6ff253c7378fd6 (patch) | |
tree | c91eaa6c67e87a556bb616a5bed08507935a0579 | |
parent | 2bea50a1f65e0e041ed48f7f8a34e62598859564 (diff) |
fixed compile issues with gcc 4.7 (see issue #72)
-rw-r--r-- | include/namespace.h | 4 | ||||
-rw-r--r-- | zend/extensionimpl.cpp | 4 | ||||
-rw-r--r-- | zend/namespace.cpp | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/include/namespace.h b/include/namespace.h index cd871d4..1775061 100644 --- a/include/namespace.h +++ b/include/namespace.h @@ -182,7 +182,7 @@ public: * * @param callback */ - void apply(const std::function<void(const std::string &ns, Function &func)> &callback); + void functions(const std::function<void(const std::string &ns, Function &func)> &callback); /** * Apply a callback to each registered class @@ -192,7 +192,7 @@ public: * * @param callback */ - void apply(const std::function<void(const std::string &ns, ClassBase &clss)> &callback); + void classes(const std::function<void(const std::string &ns, ClassBase &clss)> &callback); }; diff --git a/zend/extensionimpl.cpp b/zend/extensionimpl.cpp index 77b9985..b1ec6e8 100644 --- a/zend/extensionimpl.cpp +++ b/zend/extensionimpl.cpp @@ -257,7 +257,7 @@ zend_module_entry *ExtensionImpl::module() int i = 0; // apply a function to each function - _data->apply([&i, entries](const std::string &prefix, Function &function) { + _data->functions([&i, entries](const std::string &prefix, Function &function) { // initialize the function function.initialize(prefix, &entries[i]); @@ -286,7 +286,7 @@ zend_module_entry *ExtensionImpl::module() void ExtensionImpl::initialize(TSRMLS_D) { // we need to register each class, find out all classes - _data->apply([TSRMLS_C](const std::string &prefix, ClassBase &c) { + _data->classes([TSRMLS_C](const std::string &prefix, ClassBase &c) { // forward to implementation class c.implementation()->initialize(&c, prefix TSRMLS_CC); diff --git a/zend/namespace.cpp b/zend/namespace.cpp index bea31a1..2b4b62a 100644 --- a/zend/namespace.cpp +++ b/zend/namespace.cpp @@ -85,13 +85,13 @@ Namespace &Namespace::add(const char *name, const native_callback_3 &function, c * * @param callback */ -void Namespace::apply(const std::function<void(const std::string &ns, Function &func)> &callback) +void Namespace::functions(const std::function<void(const std::string &ns, Function &func)> &callback) { // loop through the functions, and apply the callback for (auto &function : _functions) callback(_name, *function); // loop through the other namespaces - for (auto &ns : _namespaces) ns->apply([this, callback](const std::string &ns, Function &func) { + for (auto &ns : _namespaces) ns->functions([this, callback](const std::string &ns, Function &func) { // if this is the root namespace, we don't have to change the prefix if (_name.size() == 0) return callback(ns, func); @@ -110,13 +110,13 @@ void Namespace::apply(const std::function<void(const std::string &ns, Function & * * @param callback */ -void Namespace::apply(const std::function<void(const std::string &ns, ClassBase &clss)> &callback) +void Namespace::classes(const std::function<void(const std::string &ns, ClassBase &clss)> &callback) { // loop through the classes, and apply the callback for (auto &c : _classes) callback(_name, *c); // loop through the other namespaces - for (auto &ns : _namespaces) ns->apply([this, callback](const std::string &ns, ClassBase &clss) { + for (auto &ns : _namespaces) ns->classes([this, callback](const std::string &ns, ClassBase &clss) { // if this is the root namespace, we don't have to change the prefix if (_name.size() == 0) return callback(ns, clss); |