removed namespaces

This commit is contained in:
fourtf
2018-06-26 16:37:59 +02:00
parent 15abedd869
commit 2df0566492
273 changed files with 43 additions and 826 deletions
-2
View File
@@ -1,7 +1,6 @@
#pragma once
namespace chatterino {
namespace util {
// http://en.cppreference.com/w/cpp/algorithm/clamp
@@ -11,5 +10,4 @@ constexpr const T &clamp(const T &v, const T &lo, const T &hi)
return assert(!(hi < lo)), (v < lo) ? lo : (hi < v) ? hi : v;
}
} // namespace util
} // namespace chatterino
-2
View File
@@ -4,7 +4,6 @@
#include <QString>
namespace chatterino {
namespace util {
// https://stackoverflow.com/a/13014491
static QString combinePath(const QString &a, const QString &b)
@@ -12,5 +11,4 @@ static QString combinePath(const QString &a, const QString &b)
return QDir::cleanPath(a + QDir::separator() + b);
}
} // namespace util
} // namespace chatterino
-2
View File
@@ -9,7 +9,6 @@
#include <memory>
namespace chatterino {
namespace util {
template <typename TKey, typename TValue>
class ConcurrentMap
@@ -95,5 +94,4 @@ private:
QMap<TKey, TValue> data;
};
} // namespace util
} // namespace chatterino
-2
View File
@@ -1,10 +1,8 @@
#include "DebugCount.hpp"
namespace chatterino {
namespace util {
QMap<QString, int64_t> DebugCount::counts;
std::mutex DebugCount::mut;
} // namespace util
} // namespace chatterino
-2
View File
@@ -7,7 +7,6 @@
#include <QString>
namespace chatterino {
namespace util {
class DebugCount
{
@@ -56,5 +55,4 @@ public:
}
};
} // namespace util
} // namespace chatterino
-2
View File
@@ -5,7 +5,6 @@
#include <cmath>
namespace chatterino {
namespace util {
static float distanceBetweenPoints(const QPointF &p1, const QPointF &p2)
{
@@ -18,5 +17,4 @@ static float distanceBetweenPoints(const QPointF &p1, const QPointF &p2)
return sqrt(distance);
}
} // namespace util
} // namespace chatterino
-2
View File
@@ -3,7 +3,6 @@
#include <QString>
namespace chatterino {
namespace util {
inline QString parseTagString(const QString &input)
{
@@ -50,5 +49,4 @@ inline QString parseTagString(const QString &input)
return output;
}
} // namespace util
} // namespace chatterino
-2
View File
@@ -9,7 +9,6 @@
#include <type_traits>
namespace chatterino {
namespace util {
template <class T>
class LayoutCreator
@@ -151,5 +150,4 @@ private:
}
};
} // namespace util
} // namespace chatterino
-2
View File
@@ -8,7 +8,6 @@
#include <QLibrary>
namespace chatterino {
namespace util {
// static boost::optional<UINT> getWindowDpi(quintptr ptr)
//{
@@ -51,7 +50,6 @@ namespace util {
//};
//#endif
} // namespace util
} // namespace chatterino
#endif
-2
View File
@@ -10,7 +10,6 @@
#define async_exec(a) QThreadPool::globalInstance()->start(new LambdaRunnable(a));
namespace chatterino {
namespace util {
class LambdaRunnable : public QRunnable
{
@@ -56,5 +55,4 @@ static void postToThread(F &&fun, QObject *obj = qApp)
QCoreApplication::postEvent(obj, new Event(std::forward<F>(fun)));
}
} // namespace util
} // namespace chatterino
+2
View File
@@ -4,6 +4,7 @@
#include <QString>
namespace std {
template <>
struct hash<QString> {
std::size_t operator()(const QString &s) const
@@ -11,4 +12,5 @@ struct hash<QString> {
return qHash(s);
}
};
} // namespace std
-2
View File
@@ -3,7 +3,6 @@
#include <QScrollArea>
namespace chatterino {
namespace util {
static void removeScrollAreaBackground(QScrollArea *scrollArea, QWidget *childWidget)
{
@@ -16,5 +15,4 @@ static void removeScrollAreaBackground(QScrollArea *scrollArea, QWidget *childWi
childWidget->setPalette(p);
}
} // namespace util
} // namespace chatterino
-2
View File
@@ -3,7 +3,6 @@
#include <memory>
namespace chatterino {
namespace util {
template <typename T>
struct SharedPtrElementLess {
@@ -13,5 +12,4 @@ struct SharedPtrElementLess {
}
};
} // namespace util
} // namespace chatterino
-2
View File
@@ -3,7 +3,6 @@
#include <QStandardItem>
namespace chatterino {
namespace util {
static void setBoolItem(QStandardItem *item, bool value, bool userCheckable = true,
bool selectable = true)
@@ -28,5 +27,4 @@ static QStandardItem *emptyItem()
return item;
}
} // namespace util
} // namespace chatterino
-2
View File
@@ -12,7 +12,6 @@
#include <functional>
namespace chatterino {
namespace streamlink {
namespace {
@@ -202,5 +201,4 @@ void Start(const QString &channel)
OpenStreamlink(channelURL, quality, args);
}
} // namespace streamlink
} // namespace chatterino
-2
View File
@@ -7,7 +7,6 @@
#include <string>
namespace chatterino {
namespace streamlink {
class Exception : public std::runtime_error
{
@@ -24,5 +23,4 @@ void OpenStreamlink(const QString &channelURL, const QString &quality,
// and opening a quality dialog if the quality is "Choose"
void Start(const QString &channel);
} // namespace streamlink
} // namespace chatterino
-2
View File
@@ -3,7 +3,6 @@
#ifdef USEWINSDK
namespace chatterino {
namespace util {
typedef enum MONITOR_DPI_TYPE {
MDT_EFFECTIVE_DPI = 0,
@@ -32,7 +31,6 @@ boost::optional<UINT> getWindowDpi(HWND hwnd)
return boost::none;
}
} // namespace util
} // namespace chatterino
#endif
-2
View File
@@ -6,11 +6,9 @@
#include <boost/optional.hpp>
namespace chatterino {
namespace util {
boost::optional<UINT> getWindowDpi(HWND hwnd);
} // namespace util
} // namespace chatterino
#endif