mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Using 'using' instead of 'typedef'
This commit is contained in:
@@ -36,7 +36,8 @@
|
||||
|
||||
#define PCMDATA_CACHEMAXSIZE 1048576
|
||||
|
||||
typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq);
|
||||
using alBufferDataStaticProcPtr = ALvoid AL_APIENTRY (*)(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq);
|
||||
|
||||
static ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq)
|
||||
{
|
||||
static alBufferDataStaticProcPtr proc = NULL;
|
||||
|
||||
@@ -66,9 +66,9 @@ public:
|
||||
// ------------------------------------------
|
||||
|
||||
/** Iterator, can be used to loop the Map. */
|
||||
typedef typename RefMap::iterator iterator;
|
||||
using iterator = typename RefMap::iterator;
|
||||
/** Const iterator, can be used to loop the Map. */
|
||||
typedef typename RefMap::const_iterator const_iterator;
|
||||
using const_iterator = typename RefMap::const_iterator;
|
||||
|
||||
/** Return iterator to beginning. */
|
||||
iterator begin() { return _data.begin(); }
|
||||
|
||||
@@ -53,14 +53,14 @@ public:
|
||||
// ------------------------------------------
|
||||
|
||||
/** Iterator, can be used to loop the Vector. */
|
||||
typedef typename std::vector<T>::iterator iterator;
|
||||
using iterator = typename std::vector<T>::iterator;
|
||||
/** Const iterator, can be used to loop the Vector. */
|
||||
typedef typename std::vector<T>::const_iterator const_iterator;
|
||||
using const_iterator = typename std::vector<T>::const_iterator;
|
||||
|
||||
/** Reversed iterator, can be used to loop the Vector in reverse sequence. */
|
||||
typedef typename std::vector<T>::reverse_iterator reverse_iterator;
|
||||
using reverse_iterator = typename std::vector<T>::reverse_iterator;
|
||||
/** Reversed iterator, can be used to loop the Vector in reverse sequence. */
|
||||
typedef typename std::vector<T>::const_reverse_iterator const_reverse_iterator;
|
||||
using const_reverse_iterator = typename std::vector<T>::const_reverse_iterator;
|
||||
|
||||
/** Returns an iterator pointing the first element of the Vector. */
|
||||
iterator begin() { return _data.begin(); }
|
||||
|
||||
@@ -231,8 +231,7 @@ void ActionTimeline::step(float delta)
|
||||
}
|
||||
}
|
||||
|
||||
typedef std::function<void(Node*)> tCallBack;
|
||||
void foreachNodeDescendant(Node* parent, tCallBack callback)
|
||||
static void foreachNodeDescendant(Node* parent, std::function<void(Node*)> callback)
|
||||
{
|
||||
callback(parent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user