Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11571)

Unified Diff: core/fxcrt/include/fx_string.h

Issue 1841643002: Code change to avoid signed/unsigned mismatch warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcrt/fx_basic_gcc_unittest.cpp ('k') | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/fx_string.h
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index e5f9466b21ff364e8786d5e7012b8beef553ad1c..0aa34171c2ac0d1e195e807016b59b2b0a861bea 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -134,7 +134,9 @@ inline bool operator==(const char* lhs, const CFX_ByteStringC& rhs) {
inline bool operator!=(const char* lhs, const CFX_ByteStringC& rhs) {
return rhs != lhs;
}
-#define FXBSTR_ID(c1, c2, c3, c4) ((c1 << 24) | (c2 << 16) | (c3 << 8) | (c4))
+#define FXBSTR_ID(c1, c2, c3, c4) \
+ (((uint32_t)c1 << 24) | ((uint32_t)c2 << 16) | ((uint32_t)c3 << 8) | \
+ ((uint32_t)c4))
// A mutable string with shared buffers using copy-on-write semantics that
// avoids the cost of std::string's iterator stability guarantees.
« no previous file with comments | « core/fxcrt/fx_basic_gcc_unittest.cpp ('k') | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698