X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=grpc-proxy%2Fmain-grpc.cpp;h=db3303270d0376051186924d204b23641dee2e3f;hb=a2a302d8aadc1afdae0c13c23144a5acf9d2a8b0;hp=92d4862fa02e685c4580a10a7f251ae761cee512;hpb=e7ccf51adc37748d3ca000109d16d0495dc0a7e8;p=src%2Fagl-compositor.git diff --git a/grpc-proxy/main-grpc.cpp b/grpc-proxy/main-grpc.cpp index 92d4862..db33032 100644 --- a/grpc-proxy/main-grpc.cpp +++ b/grpc-proxy/main-grpc.cpp @@ -272,9 +272,8 @@ global_remove(void *data, struct wl_registry *reg, uint32_t id) (void) id; for (std::list::iterator it = sh->globals.begin(); - it != sh->globals.end(); it++) { - sh->globals.erase(it); - } + it != sh->globals.end(); it = sh->globals.erase(it)) + ; } static const struct wl_registry_listener registry_listener = { @@ -395,9 +394,8 @@ destroy_shell_data(struct shell_data *sh) destroy_output(w_output); for (std::list::iterator it = sh->globals.begin(); - it != sh->globals.end(); it++) { - sh->globals.erase(it); - } + it != sh->globals.end(); it = sh->globals.erase(it)) + ; wl_display_flush(sh->wl_display); wl_display_disconnect(sh->wl_display);