mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Server: replace Q_FOREACH with ranged for-loops
This commit is contained in:
parent
54d0f764d4
commit
066145ab31
@ -71,8 +71,7 @@ void WSServer::Start(quint16 port)
|
|||||||
void WSServer::Stop()
|
void WSServer::Stop()
|
||||||
{
|
{
|
||||||
_clMutex.lock();
|
_clMutex.lock();
|
||||||
Q_FOREACH(QWebSocket* pClient, _clients)
|
for(QWebSocket* pClient : _clients) {
|
||||||
{
|
|
||||||
pClient->close();
|
pClient->close();
|
||||||
}
|
}
|
||||||
_clMutex.unlock();
|
_clMutex.unlock();
|
||||||
@ -84,8 +83,7 @@ void WSServer::broadcast(QString message)
|
|||||||
{
|
{
|
||||||
_clMutex.lock();
|
_clMutex.lock();
|
||||||
|
|
||||||
Q_FOREACH(QWebSocket* pClient, _clients)
|
for(QWebSocket* pClient : _clients) {
|
||||||
{
|
|
||||||
if (Config::Current()->AuthRequired
|
if (Config::Current()->AuthRequired
|
||||||
&& (pClient->property(PROP_AUTHENTICATED).toBool() == false))
|
&& (pClient->property(PROP_AUTHENTICATED).toBool() == false))
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user