Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(872)

Issue 427173002: Fix incorrect override of GetLayoutOrder(). (Closed)

Created:
6 years, 4 months ago by Nico
Modified:
6 years, 4 months ago
Reviewers:
Bo Xu
CC:
pdfium-reviews_googlegroups.com
Base URL:
https://pdfium.googlesource.com/pdfium.git@master
Visibility:
Public.

Description

Fix incorrect override of GetLayoutOrder(). fsdk_baseform.h:63:19: error: 'CPDFSDK_Widget::GetLayoutOrder' hides overloaded virtual function [-Werror,-Woverloaded-virtual] virtual int GetLayoutOrder() {return 2;} ^ fsdk_baseannot.h:70:18: note: hidden overloaded virtual function 'CPDFSDK_Annot::GetLayoutOrder' declared here: different qualifiers (const vs none) virtual int GetLayoutOrder() const { return 5; } ^ On Windows, I believe MSVS treats these as override since it's such a common and easy mistake, but clang and gcc do what the standard specifies. Add a "const" to the function in the subclass so that this is actually an override, as intended. BUG=pdfium:29 R=bo_xu@foxitsoftware.com Committed: https://pdfium.googlesource.com/pdfium/+/fe08482

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M fpdfsdk/include/fsdk_baseform.h View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Nico
6 years, 4 months ago (2014-07-30 01:30:35 UTC) #1
Bo Xu
On 2014/07/30 01:30:35, Nico (away) wrote: lgtm
6 years, 4 months ago (2014-07-30 21:15:08 UTC) #2
Nico
6 years, 4 months ago (2014-07-30 21:16:38 UTC) #3
Message was sent while issue was closed.
Committed patchset #1 manually as rfe08482 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698