Commit 70bdef19 authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

Removes constexpr from all methods in AXNode

Methods marked as constexpr could b evaluated at compile time, but this need not be true at all call sites.
This implies that all their arguments could also be constexpr, either explicitly or implicitly.
One of the restrictions is that they should contain at most one return statement.

In AXNode, the methods I marked constexpr could never have been evaluated at compile time.
In this particular case, I was under the mistaken belief that constexpr would force the methods to be inline. But even though constexpr implies inline, it also has the added implications described above.

Thanks to Robert Sesek for the advice on when to use constexpr.

TBR=dmazzoni@chromium.org, rsesek@chromium.org

Change-Id: I58a6abb816bb7ae89f346ddb5ffea4d7d46395e4
Reviewed-on: https://chromium-review.googlesource.com/1055734Reviewed-by: default avatarNektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558401}
parent a185745c
......@@ -130,8 +130,6 @@ class AX_EXPORT AXNode final {
base::string16* value) const {
return data().GetString16Attribute(attribute, value);
}
// Cannot be constexpr because |base::string16| doesn't have a constexpr
// constructor.
base::string16 GetString16Attribute(
ax::mojom::StringAttribute attribute) const {
return data().GetString16Attribute(attribute);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment