diff options
author | tsepez <tsepez@chromium.org> | 2016-04-25 11:23:43 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-25 11:23:43 -0700 |
commit | b6853cfe4fd1ee089dfdd0cb09bbc4063532ef82 (patch) | |
tree | 1404031e845c8b4b09d5a68fd81f09a7d2865d59 /xfa/fde/css/fde_cssdatatable.h | |
parent | 2a8a20cde4c8e2294f6868bb097fe450960a709f (diff) | |
download | pdfium-b6853cfe4fd1ee089dfdd0cb09bbc4063532ef82.tar.xz |
Pass CFX_*StringCs to FX_HashCode_GETA and _GETW hash functions.
Too many calls were of the form fn(x.c_str(), x.GetLength())
which is an anti-pattern given the StringC classes which tie
these together.
There are a few places where explicit CFX_*StringCs are
constructed, but this can be avoided by changing the args
to these functions in the same manner.
Removed String_ from name of functions since it added
little value. Also removed default argument.
Review URL: https://codereview.chromium.org/1919563002
Diffstat (limited to 'xfa/fde/css/fde_cssdatatable.h')
-rw-r--r-- | xfa/fde/css/fde_cssdatatable.h | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h index 8d17901d1d..a066c29f94 100644 --- a/xfa/fde/css/fde_cssdatatable.h +++ b/xfa/fde/css/fde_cssdatatable.h @@ -137,8 +137,7 @@ struct FDE_CSSPROPERTYTABLE { }; typedef FDE_CSSPROPERTYTABLE const* FDE_LPCCSSPROPERTYTABLE; -FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const FX_WCHAR* pszName, - int32_t iLength); +FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByName(const CFX_WideStringC& wsName); FDE_LPCCSSPROPERTYTABLE FDE_GetCSSPropertyByEnum(FDE_CSSPROPERTY eName); struct FDE_CSSPROPERTYVALUETABLE { FDE_CSSPROPERTYVALUE eName; @@ -148,8 +147,7 @@ struct FDE_CSSPROPERTYVALUETABLE { typedef FDE_CSSPROPERTYVALUETABLE const* FDE_LPCCSSPROPERTYVALUETABLE; FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByName( - const FX_WCHAR* pszName, - int32_t iLength); + const CFX_WideStringC& wsName); FDE_LPCCSSPROPERTYVALUETABLE FDE_GetCSSPropertyValueByEnum( FDE_CSSPROPERTYVALUE eName); struct FDE_CSSMEDIATYPETABLE { @@ -157,22 +155,22 @@ struct FDE_CSSMEDIATYPETABLE { uint16_t wValue; }; typedef FDE_CSSMEDIATYPETABLE const* FDE_LPCCSSMEDIATYPETABLE; -FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName(const FX_WCHAR* pszName, - int32_t iLength); +FDE_LPCCSSMEDIATYPETABLE FDE_GetCSSMediaTypeByName( + const CFX_WideStringC& wsName); struct FDE_CSSLENGTHUNITTABLE { uint16_t wHash; uint16_t wValue; }; typedef FDE_CSSLENGTHUNITTABLE const* FDE_LPCCSSLENGTHUNITTABLE; -FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName(const FX_WCHAR* pszName, - int32_t iLength); +FDE_LPCCSSLENGTHUNITTABLE FDE_GetCSSLengthUnitByName( + const CFX_WideStringC& wsName); struct FDE_CSSCOLORTABLE { uint32_t dwHash; FX_ARGB dwValue; }; typedef FDE_CSSCOLORTABLE const* FDE_LPCCSSCOLORTABLE; -FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const FX_WCHAR* pszName, - int32_t iLength); +FDE_LPCCSSCOLORTABLE FDE_GetCSSColorByName(const CFX_WideStringC& wsName); + struct FDE_CSSPERSUDOTABLE { FDE_CSSPERSUDO eName; const FX_WCHAR* pszName; |