diff options
| author | 2011-04-14 16:54:38 -0700 | |
|---|---|---|
| committer | 2011-05-03 15:49:40 -0700 | |
| commit | 41abd67302b52aefadc2b3dea42226f16bf6d9ba (patch) | |
| tree | ccb7851eebc2c23e290bb898a32ca23c3e7edfbc /libs/gui/Surface.cpp | |
| parent | 5b495067a07374af3ec94830a526851f640d71ba (diff) | |
frameworks/base: make the ANativeWindow query() method const
query() does not modify the object's data, so it needs to be a const method
Change-Id: I67c40a3c865461e6f1cc2193fd2d74286ff6ac8f
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'libs/gui/Surface.cpp')
| -rw-r--r-- | libs/gui/Surface.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/gui/Surface.cpp b/libs/gui/Surface.cpp index 44d9b4b4d3..812bd6ab2d 100644 --- a/libs/gui/Surface.cpp +++ b/libs/gui/Surface.cpp @@ -536,9 +536,9 @@ int Surface::queueBuffer(ANativeWindow* window, return self->queueBuffer(buffer); } -int Surface::query(ANativeWindow* window, +int Surface::query(const ANativeWindow* window, int what, int* value) { - Surface* self = getSelf(window); + const Surface* self = getSelf(window); return self->query(what, value); } @@ -697,7 +697,7 @@ int Surface::queueBuffer(android_native_buffer_t* buffer) return err; } -int Surface::query(int what, int* value) +int Surface::query(int what, int* value) const { switch (what) { case NATIVE_WINDOW_WIDTH: |