mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
#1050 prevent copy assignment of param constructor
This commit is contained in:
@@ -68,6 +68,12 @@ WiFiManagerParameter::~WiFiManagerParameter() {
|
||||
_length=0; // setting length 0, ideally the entire parameter should be removed, or added to wifimanager scope so it follows
|
||||
}
|
||||
|
||||
// WiFiManagerParameter& WiFiManagerParameter::operator=(const WiFiManagerParameter& rhs){
|
||||
// Serial.println("copy assignment op called");
|
||||
// (*this->_value) = (*rhs._value);
|
||||
// return *this;
|
||||
// }
|
||||
|
||||
// @note debug is not available in wmparameter class
|
||||
void WiFiManagerParameter::setValue(const char *defaultValue, int length) {
|
||||
if(!_id){
|
||||
@@ -89,6 +95,7 @@ void WiFiManagerParameter::setValue(const char *defaultValue, int length) {
|
||||
}
|
||||
}
|
||||
const char* WiFiManagerParameter::getValue() {
|
||||
// Serial.println(printf("Address of _value is %p\n", (void *)_value));
|
||||
return _value;
|
||||
}
|
||||
const char* WiFiManagerParameter::getID() {
|
||||
|
||||
@@ -114,6 +114,7 @@ class WiFiManagerParameter {
|
||||
WiFiManagerParameter(const char *id, const char *label, const char *defaultValue, int length, const char *custom);
|
||||
WiFiManagerParameter(const char *id, const char *label, const char *defaultValue, int length, const char *custom, int labelPlacement);
|
||||
~WiFiManagerParameter();
|
||||
// WiFiManagerParameter& operator=(const WiFiManagerParameter& rhs);
|
||||
|
||||
const char *getID();
|
||||
const char *getValue();
|
||||
@@ -128,6 +129,7 @@ class WiFiManagerParameter {
|
||||
void init(const char *id, const char *label, const char *defaultValue, int length, const char *custom, int labelPlacement);
|
||||
|
||||
private:
|
||||
WiFiManagerParameter& operator=(const WiFiManagerParameter&);
|
||||
const char *_id;
|
||||
const char *_label;
|
||||
char *_value;
|
||||
|
||||
Reference in New Issue
Block a user