mirror of
https://github.com/NohamR/RMHook-Win.git
synced 2026-05-25 19:59:46 +00:00
Add Qt libs and headers
This commit is contained in:
25
paho-mqtt3as-proxy/Qt/include/QtCore/qstack.h
Normal file
25
paho-mqtt3as-proxy/Qt/include/QtCore/qstack.h
Normal file
@@ -0,0 +1,25 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
#ifndef QSTACK_H
|
||||
#define QSTACK_H
|
||||
|
||||
#include <QtCore/qlist.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template<class T>
|
||||
class QStack : public QList<T>
|
||||
{
|
||||
public:
|
||||
// compiler-generated special member functions are fine!
|
||||
void swap(QStack<T> &other) noexcept { QList<T>::swap(other); } // prevent QList<->QStack swaps
|
||||
void push(const T &t) { QList<T>::append(t); }
|
||||
T pop() { return QList<T>::takeLast(); }
|
||||
T &top() { return QList<T>::last(); }
|
||||
const T &top() const { return QList<T>::last(); }
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QSTACK_H
|
||||
Reference in New Issue
Block a user