get rid of piForeach
apply some code analyzer recommendations ICU flag now check if libicu exists prepare for more accurate growth of containers (limited PoT, then constantly increase size)
This commit is contained in:
22
main.cpp
22
main.cpp
@@ -12,7 +12,17 @@ const char * pageTitle = "<!DOCTYPE html>"
|
||||
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
kbd.enableExitCapture();
|
||||
// piCout << PIString::readableSize(PISystemMonitor::usedRAM());
|
||||
|
||||
PIVector<int> vi;
|
||||
piForTimes(10) {
|
||||
piSleep(2.);
|
||||
vi.enlarge(1000000);
|
||||
piCout << "now" << vi.size() << vi.capacity();
|
||||
}
|
||||
|
||||
piSleep(5.);
|
||||
/*kbd.enableExitCapture();
|
||||
|
||||
PIHTTPServer server;
|
||||
|
||||
@@ -39,7 +49,7 @@ int main(int argc, char * argv[]) {
|
||||
return ret;
|
||||
});
|
||||
|
||||
server.registerPath("/api/*", MicrohttpdServer::Method::Post, [](const MicrohttpdServer::Request & r) -> MicrohttpdServer::Reply {
|
||||
server.registerPath("/api/", MicrohttpdServer::Method::Post, [](const MicrohttpdServer::Request & r) -> MicrohttpdServer::Reply {
|
||||
MicrohttpdServer::Reply ret;
|
||||
ret.setBody("<!DOCTYPE html><html><body>API etry %1</body></html>"_a.arg(r.path).toUTF8());
|
||||
ret.setCode(405);
|
||||
@@ -51,7 +61,7 @@ int main(int argc, char * argv[]) {
|
||||
ret.setBody("<!DOCTYPE html><html><body>Unknown</body></html>"_a.arg(r.path).toUTF8());
|
||||
ret.setCode(404);
|
||||
return ret;
|
||||
});
|
||||
});*/
|
||||
|
||||
/*server.setRequestCallback([](MicrohttpdServer::Request r) -> MicrohttpdServer::Reply {
|
||||
MicrohttpdServer::Reply rep;
|
||||
@@ -63,10 +73,12 @@ int main(int argc, char * argv[]) {
|
||||
rep.setBody(PIByteArray::fromAscii("[{\"value1\": true, \"value2\": \"ыекштп\"}]"));
|
||||
return rep;
|
||||
});*/
|
||||
piCout << "start" << server.isListen();
|
||||
|
||||
/*piCout << "start" << server.isListen();
|
||||
|
||||
WAIT_FOR_EXIT
|
||||
|
||||
server.stop();
|
||||
server.stop();*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user