summaryrefslogtreecommitdiff
path: root/fxjs/cjs_eventhandler.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-21 15:02:24 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-21 15:02:24 +0000
commit9c292fef316739f43730f11b9a2b6d3e4b725b54 (patch)
treee286b6c7a36c50eba235c7b69b30b95fc36cb906 /fxjs/cjs_eventhandler.h
parentbcd66f54de1291ddf8b7b7caca3e7360e14fcc8d (diff)
downloadpdfium-9c292fef316739f43730f11b9a2b6d3e4b725b54.tar.xz
Avoid const-refs to implicitly constructed strings.
Because the invisible temporary goes out of scope at the next semicolon. Also avoid returning const string references since the cost is low to properly keep the string alive. Change-Id: Id283e4fd99f79a02d79d739a533a4ce05e831e2a Reviewed-on: https://pdfium-review.googlesource.com/35710 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxjs/cjs_eventhandler.h')
-rw-r--r--fxjs/cjs_eventhandler.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/cjs_eventhandler.h b/fxjs/cjs_eventhandler.h
index aa02895924..7c33ed739e 100644
--- a/fxjs/cjs_eventhandler.h
+++ b/fxjs/cjs_eventhandler.h
@@ -144,7 +144,7 @@ class CJS_EventHandler {
bool IsValid() const;
WideString& Change();
- const WideString& ChangeEx();
+ WideString ChangeEx() const;
int CommitKey() const;
bool FieldFull() const;
bool KeyDown() const;
@@ -161,7 +161,7 @@ class CJS_EventHandler {
CJS_Field* Target_Field();
WideString& Value();
bool WillCommit() const;
- const WideString& TargetName() const;
+ WideString TargetName() const;
JS_EVENT_T EventType() const { return m_eEventType; }