summaryrefslogtreecommitdiff
path: root/fpdfsdk/include
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/include')
-rw-r--r--fpdfsdk/include/fsdk_baseannot.h14
-rw-r--r--fpdfsdk/include/fxedit/fxet_list.h6
-rw-r--r--fpdfsdk/include/pdfwindow/PWL_Wnd.h6
3 files changed, 12 insertions, 14 deletions
diff --git a/fpdfsdk/include/fsdk_baseannot.h b/fpdfsdk/include/fsdk_baseannot.h
index c0ed529782..8cee331f64 100644
--- a/fpdfsdk/include/fsdk_baseannot.h
+++ b/fpdfsdk/include/fsdk_baseannot.h
@@ -36,19 +36,19 @@ class CPDFSDK_DateTime {
CPDFSDK_DateTime& operator=(const CPDFSDK_DateTime& datetime);
CPDFSDK_DateTime& operator=(const FX_SYSTEMTIME& st);
- FX_BOOL operator==(CPDFSDK_DateTime& datetime);
- FX_BOOL operator!=(CPDFSDK_DateTime& datetime);
- FX_BOOL operator>(CPDFSDK_DateTime& datetime);
- FX_BOOL operator>=(CPDFSDK_DateTime& datetime);
- FX_BOOL operator<(CPDFSDK_DateTime& datetime);
- FX_BOOL operator<=(CPDFSDK_DateTime& datetime);
+ bool operator==(const CPDFSDK_DateTime& datetime) const;
+ bool operator!=(const CPDFSDK_DateTime& datetime) const;
+ bool operator>(const CPDFSDK_DateTime& datetime) const;
+ bool operator>=(const CPDFSDK_DateTime& datetime) const;
+ bool operator<(const CPDFSDK_DateTime& datetime) const;
+ bool operator<=(const CPDFSDK_DateTime& datetime) const;
operator time_t();
CPDFSDK_DateTime& FromPDFDateTimeString(const CFX_ByteString& dtStr);
CFX_ByteString ToCommonDateTimeString();
CFX_ByteString ToPDFDateTimeString();
void ToSystemTime(FX_SYSTEMTIME& st);
- CPDFSDK_DateTime ToGMT();
+ CPDFSDK_DateTime ToGMT() const;
CPDFSDK_DateTime& AddDays(short days);
CPDFSDK_DateTime& AddSeconds(int seconds);
diff --git a/fpdfsdk/include/fxedit/fxet_list.h b/fpdfsdk/include/fxedit/fxet_list.h
index 88d57c4928..a02cd8a45e 100644
--- a/fpdfsdk/include/fxedit/fxet_list.h
+++ b/fpdfsdk/include/fxedit/fxet_list.h
@@ -67,13 +67,11 @@ class CLST_Rect : public CFX_FloatRect {
return *this;
}
- FX_BOOL operator==(const CLST_Rect& rect) const {
+ bool operator==(const CLST_Rect& rect) const {
return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0;
}
- FX_BOOL operator!=(const CLST_Rect& rect) const {
- return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) != 0;
- }
+ bool operator!=(const CLST_Rect& rect) const { return !(*this == rect); }
FX_FLOAT Width() const { return right - left; }
diff --git a/fpdfsdk/include/pdfwindow/PWL_Wnd.h b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
index 19046e6c9c..493cdc0874 100644
--- a/fpdfsdk/include/pdfwindow/PWL_Wnd.h
+++ b/fpdfsdk/include/pdfwindow/PWL_Wnd.h
@@ -134,7 +134,7 @@ struct CPWL_Color {
FX_FLOAT fColor1, fColor2, fColor3, fColor4;
};
-inline FX_BOOL operator==(const CPWL_Color& c1, const CPWL_Color& c2) {
+inline bool operator==(const CPWL_Color& c1, const CPWL_Color& c2) {
return c1.nColorType == c2.nColorType && c1.fColor1 - c2.fColor1 < 0.0001 &&
c1.fColor1 - c2.fColor1 > -0.0001 &&
c1.fColor2 - c2.fColor2 < 0.0001 &&
@@ -144,8 +144,8 @@ inline FX_BOOL operator==(const CPWL_Color& c1, const CPWL_Color& c2) {
c1.fColor4 - c2.fColor4 < 0.0001 && c1.fColor4 - c2.fColor4 > -0.0001;
}
-inline FX_BOOL operator!=(const CPWL_Color& c1, const CPWL_Color& c2) {
- return !operator==(c1, c2);
+inline bool operator!=(const CPWL_Color& c1, const CPWL_Color& c2) {
+ return !(c1 == c2);
}
#define PWL_SCROLLBAR_WIDTH 12.0f