fix some basic type issues:
use size_t for size as async web server uses this type internally use uint8_t for provision mode, we only have 3 values address warnings about ordering initializers
This commit is contained in:
parent
b197ee8a80
commit
167cfa283b
@ -37,7 +37,7 @@ class APSettingsService : public SettingsService {
|
||||
private:
|
||||
|
||||
// access point settings
|
||||
int _provisionMode;
|
||||
uint8_t _provisionMode;
|
||||
String _ssid;
|
||||
String _password;
|
||||
|
||||
|
@ -21,7 +21,7 @@ class AsyncJsonCallbackResponse: public AsyncJsonResponse {
|
||||
|
||||
public:
|
||||
|
||||
AsyncJsonCallbackResponse(AsyncJsonCallback callback, bool isArray=false) : _callback{callback}, AsyncJsonResponse(isArray) {}
|
||||
AsyncJsonCallbackResponse(AsyncJsonCallback callback, bool isArray=false) : AsyncJsonResponse(isArray), _callback{callback} {}
|
||||
~AsyncJsonCallbackResponse() {
|
||||
_callback();
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class AsyncJsonRequestWebHandler: public AsyncWebHandler {
|
||||
String _uri;
|
||||
WebRequestMethodComposite _method;
|
||||
JsonRequestCallback _onRequest;
|
||||
int _maxContentLength;
|
||||
size_t _maxContentLength;
|
||||
|
||||
public:
|
||||
|
||||
@ -36,7 +36,7 @@ class AsyncJsonRequestWebHandler: public AsyncWebHandler {
|
||||
|
||||
void setUri(const String& uri) { _uri = uri; }
|
||||
void setMethod(WebRequestMethodComposite method) { _method = method; }
|
||||
void setMaxContentLength(int maxContentLength) { _maxContentLength = maxContentLength; }
|
||||
void setMaxContentLength(size_t maxContentLength) { _maxContentLength = maxContentLength; }
|
||||
void onRequest(JsonRequestCallback fn) { _onRequest = fn; }
|
||||
|
||||
virtual bool canHandle(AsyncWebServerRequest *request) override final {
|
||||
|
@ -122,7 +122,7 @@ private:
|
||||
public:
|
||||
|
||||
SettingsService(AsyncWebServer* server, FS* fs, char const* servicePath, char const* filePath):
|
||||
_server(server), _fs(fs), _filePath(filePath) {
|
||||
_filePath(filePath), _server(server), _fs(fs){
|
||||
|
||||
// configure fetch config handler
|
||||
_server->on(servicePath, HTTP_GET, std::bind(&SettingsService::fetchConfig, this, std::placeholders::_1));
|
||||
|
Loading…
Reference in New Issue
Block a user