chore: remove StdExcept and include stdexcept directly where needed
remove _NOEXCEPT define and just use throw()
This commit is contained in:
@ -8,7 +8,8 @@
|
||||
#pragma once
|
||||
|
||||
#include "common/Common.h"
|
||||
#include "common/StdExcept.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
//! Generic thread exception
|
||||
@ -57,7 +58,7 @@ public:
|
||||
XArchEval()
|
||||
{
|
||||
}
|
||||
virtual ~XArchEval() _NOEXCEPT
|
||||
virtual ~XArchEval() throw()
|
||||
{
|
||||
}
|
||||
|
||||
@ -75,7 +76,7 @@ public:
|
||||
XArch(const std::string &msg) : std::runtime_error(msg)
|
||||
{
|
||||
}
|
||||
virtual ~XArch() _NOEXCEPT
|
||||
virtual ~XArch() throw()
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
@ -16,7 +16,7 @@ public:
|
||||
XArchEvalUnix(int error) : m_error(error)
|
||||
{
|
||||
}
|
||||
virtual ~XArchEvalUnix() _NOEXCEPT
|
||||
virtual ~XArchEvalUnix() throw()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -26,12 +26,12 @@ XBase::XBase(const std::string &msg) : std::runtime_error(msg)
|
||||
// do nothing
|
||||
}
|
||||
|
||||
XBase::~XBase() _NOEXCEPT
|
||||
XBase::~XBase() throw()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const char *XBase::what() const _NOEXCEPT
|
||||
const char *XBase::what() const throw()
|
||||
{
|
||||
if (const char *what = std::runtime_error::what(); what != nullptr && what[0] != '\0') {
|
||||
return what;
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/StdExcept.h"
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
|
||||
//! Exception base class
|
||||
@ -21,10 +21,10 @@ public:
|
||||
XBase();
|
||||
//! Use \c msg as the result of what()
|
||||
XBase(const std::string &msg);
|
||||
virtual ~XBase() _NOEXCEPT;
|
||||
virtual ~XBase() throw();
|
||||
|
||||
//! Reason for exception
|
||||
virtual const char *what() const _NOEXCEPT;
|
||||
virtual const char *what() const throw();
|
||||
|
||||
protected:
|
||||
//! Get a human readable string describing the exception
|
||||
@ -61,7 +61,7 @@ declared.
|
||||
name_(const std::string &msg) : super_(msg) \
|
||||
{ \
|
||||
} \
|
||||
virtual ~name_() _NOEXCEPT \
|
||||
virtual ~name_() throw() \
|
||||
{ \
|
||||
} \
|
||||
}
|
||||
@ -82,7 +82,7 @@ implemented.
|
||||
name_(const std::string &msg) : super_(msg) \
|
||||
{ \
|
||||
} \
|
||||
virtual ~name_() _NOEXCEPT \
|
||||
virtual ~name_() throw() \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
@ -116,11 +116,11 @@ c'tor.
|
||||
name_(const std::string &msg) : super_(msg), m_state(kFirst) \
|
||||
{ \
|
||||
} \
|
||||
virtual ~name_() _NOEXCEPT \
|
||||
virtual ~name_() throw() \
|
||||
{ \
|
||||
} \
|
||||
\
|
||||
virtual const char *what() const _NOEXCEPT \
|
||||
virtual const char *what() const throw() \
|
||||
{ \
|
||||
if (m_state == kFirst) { \
|
||||
m_state = kFormat; \
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
#include "base/TMethodEventJob.h"
|
||||
#include "base/TMethodJob.h"
|
||||
#include "client/ServerProxy.h"
|
||||
#include "common/StdExcept.h"
|
||||
#include "deskflow/AppUtil.h"
|
||||
#include "deskflow/DropHelper.h"
|
||||
#include "deskflow/FileChunk.h"
|
||||
@ -39,6 +38,7 @@
|
||||
#include <iterator>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace deskflow::client;
|
||||
|
||||
|
||||
@ -6,7 +6,6 @@ configure_file(Constants.h.in Constants.h @ONLY)
|
||||
add_library(common STATIC
|
||||
Common.h
|
||||
IInterface.h
|
||||
StdExcept.h
|
||||
Settings.h
|
||||
Settings.cpp
|
||||
QSettingsProxy.cpp
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* Deskflow -- mouse and keyboard sharing utility
|
||||
* SPDX-FileCopyrightText: (C) 2014 - 2016 Symless Ltd.
|
||||
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
// apple declares _NOEXCEPT
|
||||
#ifndef _NOEXCEPT
|
||||
#define _NOEXCEPT throw()
|
||||
#endif
|
||||
@ -7,11 +7,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/StdExcept.h"
|
||||
#include "deskflow/ClientArgs.h"
|
||||
#include "deskflow/DragInformation.h"
|
||||
#include "deskflow/IPlatformScreen.h"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
//! Base screen implementation
|
||||
/*!
|
||||
This screen implementation is the superclass of all other screen
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include "base/Log.h"
|
||||
#include "base/Stopwatch.h"
|
||||
#include "base/String.h"
|
||||
#include "common/StdExcept.h"
|
||||
#include "deskflow/ClipboardChunk.h"
|
||||
#include "deskflow/FileChunk.h"
|
||||
#include "deskflow/ProtocolTypes.h"
|
||||
@ -20,6 +19,7 @@
|
||||
#include "mt/Mutex.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ class XDuplicateClient : public XDeskflow
|
||||
{
|
||||
public:
|
||||
XDuplicateClient(const std::string &name);
|
||||
virtual ~XDuplicateClient() _NOEXCEPT
|
||||
virtual ~XDuplicateClient() throw()
|
||||
{
|
||||
}
|
||||
|
||||
@ -94,7 +94,7 @@ class XUnknownClient : public XDeskflow
|
||||
{
|
||||
public:
|
||||
XUnknownClient(const std::string &name);
|
||||
virtual ~XUnknownClient() _NOEXCEPT
|
||||
virtual ~XUnknownClient() throw()
|
||||
{
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ class XExitApp : public XDeskflow
|
||||
{
|
||||
public:
|
||||
XExitApp(int code);
|
||||
virtual ~XExitApp() _NOEXCEPT
|
||||
virtual ~XExitApp() throw()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ XScreenUnavailable::XScreenUnavailable(double timeUntilRetry) : m_timeUntilRetry
|
||||
// do nothing
|
||||
}
|
||||
|
||||
XScreenUnavailable::~XScreenUnavailable() _NOEXCEPT
|
||||
XScreenUnavailable::~XScreenUnavailable() throw()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ public:
|
||||
trying to open the screen again.
|
||||
*/
|
||||
XScreenUnavailable(double timeUntilRetry);
|
||||
virtual ~XScreenUnavailable() _NOEXCEPT;
|
||||
virtual ~XScreenUnavailable() throw();
|
||||
|
||||
//! @name manipulators
|
||||
//@{
|
||||
|
||||
@ -12,9 +12,10 @@
|
||||
// XSocketAddress
|
||||
//
|
||||
|
||||
XSocketAddress::XSocketAddress(EError error, const std::string &hostname, int port) _NOEXCEPT : m_error(error),
|
||||
m_hostname(hostname),
|
||||
m_port(port)
|
||||
XSocketAddress::XSocketAddress(EError error, const std::string &hostname, int port) throw()
|
||||
: m_error(error),
|
||||
m_hostname(hostname),
|
||||
m_port(port)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@ -31,8 +31,8 @@ public:
|
||||
kBadPort //!< The port is invalid
|
||||
};
|
||||
|
||||
XSocketAddress(EError, const std::string &hostname, int port) _NOEXCEPT;
|
||||
virtual ~XSocketAddress() _NOEXCEPT
|
||||
XSocketAddress(EError, const std::string &hostname, int port) throw();
|
||||
virtual ~XSocketAddress() throw()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@ -2114,7 +2114,7 @@ XConfigRead::XConfigRead(const ConfigReadContext &context, const char *errorFmt,
|
||||
// do nothing
|
||||
}
|
||||
|
||||
XConfigRead::~XConfigRead() _NOEXCEPT
|
||||
XConfigRead::~XConfigRead() throw()
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@ -563,7 +563,7 @@ class XConfigRead : public XBase
|
||||
public:
|
||||
XConfigRead(const ConfigReadContext &context, const std::string &);
|
||||
XConfigRead(const ConfigReadContext &context, const char *errorFmt, const std::string &arg);
|
||||
virtual ~XConfigRead() _NOEXCEPT;
|
||||
virtual ~XConfigRead() throw();
|
||||
|
||||
protected:
|
||||
// XBase overrides
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
#include "base/Log.h"
|
||||
#include "base/TMethodEventJob.h"
|
||||
#include "base/TMethodJob.h"
|
||||
#include "common/StdExcept.h"
|
||||
#include "deskflow/AppUtil.h"
|
||||
#include "deskflow/DropHelper.h"
|
||||
#include "deskflow/FileChunk.h"
|
||||
@ -35,6 +34,7 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <ctime>
|
||||
#include <stdexcept>
|
||||
|
||||
using namespace deskflow::server;
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
#include "base/TMethodEventJob.h"
|
||||
#include "base/TMethodJob.h"
|
||||
#include "client/Client.h"
|
||||
#include "common/StdExcept.h"
|
||||
#include "deskflow/FileChunk.h"
|
||||
#include "deskflow/StreamChunker.h"
|
||||
#include "mt/Thread.h"
|
||||
@ -33,6 +32,7 @@
|
||||
#include <fstream>
|
||||
#include <gtest/gtest.h>
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
#include <stdio.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@ -7,7 +7,8 @@
|
||||
#include "test/shared/TestEventQueue.h"
|
||||
|
||||
#include "base/TMethodEventJob.h"
|
||||
#include "common/StdExcept.h"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
void TestEventQueue::raiseQuitEvent()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user