summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript/global.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 11:09:44 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 11:09:44 -0700
commitfbf266fc0ea4be2523cbb901a641aa33f0035662 (patch)
treed0e5eda4d3c220818903eca76bc2ca835a1851d0 /fpdfsdk/src/javascript/global.cpp
parent3c949d5d2b0d680839766ea99c86b263230b263d (diff)
downloadpdfium-fbf266fc0ea4be2523cbb901a641aa33f0035662.tar.xz
Remove typdefs for pointer types in fx_system.h.
This involves fixing some multiple variable per line declarations, as the textually-substituted "*" applies only to the first one. This involves moving some consts around following the substitution. This involves replacing some typedefs used as constructors with better code. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1171733003
Diffstat (limited to 'fpdfsdk/src/javascript/global.cpp')
-rw-r--r--fpdfsdk/src/javascript/global.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/fpdfsdk/src/javascript/global.cpp b/fpdfsdk/src/javascript/global.cpp
index 7065933143..bbe5c02257 100644
--- a/fpdfsdk/src/javascript/global.cpp
+++ b/fpdfsdk/src/javascript/global.cpp
@@ -138,17 +138,17 @@ void global_alternate::Initial(CPDFDoc_Environment* pApp)
UpdateGlobalPersistentVariables();
}
-FX_BOOL global_alternate::QueryProperty(FX_LPCWSTR propname)
+FX_BOOL global_alternate::QueryProperty(const FX_WCHAR* propname)
{
return CFX_WideString(propname) != L"setPersistent";
}
-FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CFX_WideString& sError)
+FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CFX_WideString& sError)
{
js_global_data* pData = NULL;
CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname);
- if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sPropName, (void*&)pData))
{
pData->bDeleted = TRUE;
return TRUE;
@@ -157,7 +157,7 @@ FX_BOOL global_alternate::DelProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CF
return FALSE;
}
-FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS_PropValue& vp, CFX_WideString& sError)
+FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, const FX_WCHAR* propname, CJS_PropValue& vp, CFX_WideString& sError)
{
if (vp.IsSetting())
{
@@ -206,7 +206,7 @@ FX_BOOL global_alternate::DoProperty(IFXJS_Context* cc, FX_LPCWSTR propname, CJS
js_global_data* pData = NULL;
CFX_ByteString sPropName = CFX_ByteString::FromUnicode(propname);
- if (m_mapGlobal.Lookup(sPropName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sPropName, (void*&)pData))
{
if (pData)
{
@@ -270,7 +270,7 @@ FX_BOOL global_alternate::setPersistent(IFXJS_Context* cc, const CJS_Parameters&
CFX_ByteString sName = params[0].ToCFXByteString();
js_global_data* pData = NULL;
- if (m_mapGlobal.Lookup(sName, (FX_LPVOID&)pData))
+ if (m_mapGlobal.Lookup(sName, (void*&)pData))
{
if (pData && !pData->bDeleted)
{
@@ -341,7 +341,7 @@ void global_alternate::CommitGlobalPersisitentVariables()
{
CFX_ByteString name;
js_global_data* pData = NULL;
- m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData);
+ m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData);
if (pData)
{
@@ -495,7 +495,7 @@ void global_alternate::DestroyGlobalPersisitentVariables()
{
CFX_ByteString name;
js_global_data* pData = NULL;
- m_mapGlobal.GetNextAssoc(pos, name, (FX_LPVOID&)pData);
+ m_mapGlobal.GetNextAssoc(pos, name, (void*&)pData);
delete pData;
}
@@ -503,13 +503,13 @@ void global_alternate::DestroyGlobalPersisitentVariables()
}
-FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType,
+FX_BOOL global_alternate::SetGlobalVariables(const FX_CHAR* propname, int nType,
double dData, bool bData, const CFX_ByteString& sData, JSObject pData, bool bDefaultPersistent)
{
if (propname == NULL) return FALSE;
js_global_data* pTemp = NULL;
- m_mapGlobal.Lookup(propname, (FX_LPVOID&)pTemp);
+ m_mapGlobal.Lookup(propname, (void*&)pTemp);
if (pTemp)
{
@@ -601,7 +601,7 @@ FX_BOOL global_alternate::SetGlobalVariables(FX_LPCSTR propname, int nType,
return FALSE;
}
- m_mapGlobal.SetAt(propname, (FX_LPVOID)pNewData);
+ m_mapGlobal.SetAt(propname, (void*)pNewData);
return TRUE;
}