mirror of https://github.com/ARMmbed/mbed-os.git
commit
d089c86f09
|
|
@ -54,7 +54,7 @@ TEST_F(TestTCPServer, constructor)
|
||||||
|
|
||||||
TEST_F(TestTCPServer, constructor_parameters)
|
TEST_F(TestTCPServer, constructor_parameters)
|
||||||
{
|
{
|
||||||
TCPServer serverParam = TCPServer(&stack);
|
TCPServer serverParam(&stack);
|
||||||
const SocketAddress a("127.0.0.1", 1024);
|
const SocketAddress a("127.0.0.1", 1024);
|
||||||
EXPECT_EQ(serverParam.connect(a), NSAPI_ERROR_OK);
|
EXPECT_EQ(serverParam.connect(a), NSAPI_ERROR_OK);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,6 @@
|
||||||
#ifndef MBED_NONCOPYABLE_H_
|
#ifndef MBED_NONCOPYABLE_H_
|
||||||
#define MBED_NONCOPYABLE_H_
|
#define MBED_NONCOPYABLE_H_
|
||||||
|
|
||||||
#if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0))
|
|
||||||
#include "platform/mbed_toolchain.h"
|
|
||||||
#include "platform/mbed_debug.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace mbed {
|
namespace mbed {
|
||||||
|
|
||||||
/** \addtogroup platform-public-api */
|
/** \addtogroup platform-public-api */
|
||||||
|
|
@ -176,39 +171,6 @@ protected:
|
||||||
*/
|
*/
|
||||||
~NonCopyable() = default;
|
~NonCopyable() = default;
|
||||||
|
|
||||||
#if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0))
|
|
||||||
/**
|
|
||||||
* NonCopyable copy constructor.
|
|
||||||
*
|
|
||||||
* A compile time warning is issued when this function is used, and a runtime
|
|
||||||
* warning is printed when the copy construction of the noncopyable happens.
|
|
||||||
*
|
|
||||||
* If you see this warning, your code is probably doing something unspecified.
|
|
||||||
* Copying of noncopyable resources can lead to resource leak and random error.
|
|
||||||
*/
|
|
||||||
MBED_DEPRECATED("Invalid copy construction of a NonCopyable resource.")
|
|
||||||
NonCopyable(const NonCopyable &)
|
|
||||||
{
|
|
||||||
debug("Invalid copy construction of a NonCopyable resource: %s\r\n", MBED_PRETTY_FUNCTION);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NonCopyable copy assignment operator.
|
|
||||||
*
|
|
||||||
* A compile time warning is issued when this function is used, and a runtime
|
|
||||||
* warning is printed when the copy construction of the noncopyable happens.
|
|
||||||
*
|
|
||||||
* If you see this warning, your code is probably doing something unspecified.
|
|
||||||
* Copying of noncopyable resources can lead to resource leak and random error.
|
|
||||||
*/
|
|
||||||
MBED_DEPRECATED("Invalid copy assignment of a NonCopyable resource.")
|
|
||||||
NonCopyable &operator=(const NonCopyable &)
|
|
||||||
{
|
|
||||||
debug("Invalid copy assignment of a NonCopyable resource: %s\r\n", MBED_PRETTY_FUNCTION);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* Define copy constructor as deleted. Any attempt to copy construct
|
* Define copy constructor as deleted. Any attempt to copy construct
|
||||||
|
|
@ -222,7 +184,6 @@ public:
|
||||||
*/
|
*/
|
||||||
NonCopyable &operator=(const NonCopyable &) = delete;
|
NonCopyable &operator=(const NonCopyable &) = delete;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
|
||||||
|
|
@ -36,11 +36,6 @@
|
||||||
"value": 9600
|
"value": 9600
|
||||||
},
|
},
|
||||||
|
|
||||||
"force-non-copyable-error": {
|
|
||||||
"help": "Force compile time error when a NonCopyable object is copied",
|
|
||||||
"value": false
|
|
||||||
},
|
|
||||||
|
|
||||||
"poll-use-lowpower-timer": {
|
"poll-use-lowpower-timer": {
|
||||||
"help": "Enable use of low power timer class for poll(). May cause missing events.",
|
"help": "Enable use of low power timer class for poll(). May cause missing events.",
|
||||||
"value": false
|
"value": false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue