Replace c_str() with AsStringView() in FX_ParseDateUsingFormat()
Contains() already wants a view, so no need to convert to c-style
strings first.
-- kill a blank line while at it.
Change-Id: Ia03b02eca117b76239ce561952c09ede1055d4fc
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/86750
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Auto-Submit: Tom Sepez <tsepez@chromium.org>
diff --git a/fxjs/fx_date_helpers.cpp b/fxjs/fx_date_helpers.cpp
index c0d8998..c1d27e4 100644
--- a/fxjs/fx_date_helpers.cpp
+++ b/fxjs/fx_date_helpers.cpp
@@ -474,7 +474,7 @@
for (size_t m = 0; m < pdfium::size(kFullMonths); ++m) {
WideString sFullMonths = WideString(kFullMonths[m]);
sFullMonths.MakeLower();
- if (sFullMonths.Contains(sMonth.c_str())) {
+ if (sFullMonths.Contains(sMonth.AsStringView())) {
nMonth = m + 1;
i += 4;
j += nSkip;
@@ -483,7 +483,6 @@
}
}
}
-
if (!bFind) {
nMonth = FX_ParseStringInteger(value, j, &nSkip, 4);
i += 4;