From fae5e26d983848089e35e2b53e9da24036661b08 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 20 Nov 2017 19:58:13 +0000 Subject: Make some CJS_EventHandler methods const. Change-Id: Ie95b6a4c2613b5e110d2dd1244dd4a87375f624f Reviewed-on: https://pdfium-review.googlesource.com/18750 Reviewed-by: Ryan Harrison Commit-Queue: Lei Zhang --- fxjs/cjs_publicmethods.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fxjs/cjs_publicmethods.cpp') diff --git a/fxjs/cjs_publicmethods.cpp b/fxjs/cjs_publicmethods.cpp index 856fa11732..f54bc5ba4d 100644 --- a/fxjs/cjs_publicmethods.cpp +++ b/fxjs/cjs_publicmethods.cpp @@ -1228,7 +1228,7 @@ CJS_Return CJS_PublicMethods::AFDate_KeystrokeEx( if (!pEvent->m_pValue) return CJS_Return(false); - WideString strValue = pEvent->Value(); + const WideString& strValue = pEvent->Value(); if (strValue.IsEmpty()) return CJS_Return(true); @@ -1369,7 +1369,7 @@ CJS_Return CJS_PublicMethods::AFSpecial_Format( if (!pEvent->m_pValue) return CJS_Return(false); - WideString wsSource = pEvent->Value(); + const WideString& wsSource = pEvent->Value(); WideString wsFormat; switch (pRuntime->ToInt32(params[0])) { case 0: @@ -1405,7 +1405,7 @@ CJS_Return CJS_PublicMethods::AFSpecial_KeystrokeEx( if (!pEvent->m_pValue) return CJS_Return(false); - WideString& valEvent = pEvent->Value(); + const WideString& valEvent = pEvent->Value(); WideString wstrMask = pRuntime->ToWideString(params[0]); if (wstrMask.IsEmpty()) return CJS_Return(true); -- cgit v1.2.3