Code Review
/
staging
/
windowmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
main: use auto variables where appropriate and sensible
[staging/windowmanager.git]
/
src
/
main.cpp
diff --git
a/src/main.cpp
b/src/main.cpp
index
cc94190
..
9b2f48a
100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-4,11
+4,6
@@
#include <unistd.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdlib.h>
-#include <string.h>
-
-#include <memory>
-#include <string>
-#include <vector>
#include <sys/poll.h>
#include <sys/poll.h>
@@
-51,8
+46,8
@@
int check_events(struct wl::display *d, struct conn *c, int fd) {
if (!c->c->surfaces.empty()) {
puts("Surfaces:");
for (auto const &i : c->c->surfaces) {
if (!c->c->surfaces.empty()) {
puts("Surfaces:");
for (auto const &i : c->c->surfaces) {
-
struct genivi::rect
const &r = i.second->dst_rect;
-
struct genivi::size
const &s = i.second->size;
+
auto
const &r = i.second->dst_rect;
+
auto
const &s = i.second->size;
printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
r.x, r.y);
}
printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
r.x, r.y);
}
@@
-62,8
+57,8
@@
int check_events(struct wl::display *d, struct conn *c, int fd) {
if (!c->c->layers.empty()) {
puts("Layers:");
for (auto const &i : c->c->layers) {
if (!c->c->layers.empty()) {
puts("Layers:");
for (auto const &i : c->c->layers) {
-
struct genivi::rect
const &r = i.second->dst_rect;
-
struct genivi::size
const &s = i.second->size;
+
auto
const &r = i.second->dst_rect;
+
auto
const &s = i.second->size;
printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
r.x, r.y);
}
printf("%d [%ux%u] (%ux%u@%dx%d), ", i.first, s.w, s.h, r.w, r.h,
r.x, r.y);
}