Fix some nits in fx_memory code.

- Make some constants constexpr.
- Fix a typo.

Change-Id: Ie6387c6951487798043ab07a9ac7b949ceda3094
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/100632
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxcrt/fx_memory.h b/core/fxcrt/fx_memory.h
index 10bb08d..9022048 100644
--- a/core/fxcrt/fx_memory.h
+++ b/core/fxcrt/fx_memory.h
@@ -44,7 +44,7 @@
   static_cast<type*>(pdfium::internal::Realloc(ptr, size, sizeof(type)))
 
 // These never return nullptr, but return uninitialized memory.
-// TOOD(thestig): Add FX_TryAllocUninit() if there is a use case.
+// TODO(thestig): Add FX_TryAllocUninit() if there is a use case.
 #define FX_AllocUninit(type, size) \
   static_cast<type*>(pdfium::internal::AllocOrDie(size, sizeof(type)))
 #define FX_AllocUninit2D(type, w, h) \
diff --git a/core/fxcrt/fx_memory_unittest.cpp b/core/fxcrt/fx_memory_unittest.cpp
index 9490c61..e0de4f4 100644
--- a/core/fxcrt/fx_memory_unittest.cpp
+++ b/core/fxcrt/fx_memory_unittest.cpp
@@ -11,13 +11,13 @@
 
 namespace {
 
-const size_t kMaxByteAlloc = std::numeric_limits<size_t>::max();
-const size_t kMaxIntAlloc = kMaxByteAlloc / sizeof(int);
-const size_t kOverflowIntAlloc = kMaxIntAlloc + 100;
-const size_t kWidth = 640;
-const size_t kOverflowIntAlloc2D = kMaxIntAlloc / kWidth + 10;
-const size_t kCloseToMaxIntAlloc = kMaxIntAlloc - 100;
-const size_t kCloseToMaxByteAlloc = kMaxByteAlloc - 100;
+constexpr size_t kMaxByteAlloc = std::numeric_limits<size_t>::max();
+constexpr size_t kMaxIntAlloc = kMaxByteAlloc / sizeof(int);
+constexpr size_t kOverflowIntAlloc = kMaxIntAlloc + 100;
+constexpr size_t kWidth = 640;
+constexpr size_t kOverflowIntAlloc2D = kMaxIntAlloc / kWidth + 10;
+constexpr size_t kCloseToMaxIntAlloc = kMaxIntAlloc - 100;
+constexpr size_t kCloseToMaxByteAlloc = kMaxByteAlloc - 100;
 
 }  // namespace