Static assert bounds of PP_TextRenderingMode and FPDF_TEXT_RENDERMODE
PDFium's FPDFText_GetTextRenderMode() is technically an experimental API, but it guarantees to return enum values within a certain range. By statically asserting the bounds of FPDF_TEXT_RENDERMODE, we can simply DCHECK the returned value of FPDFText_GetTextRenderMode() against those bounds instead of handling an out-of-bounds value in runtime. Change-Id: I89d377eeaaab5186712e6b85683bf658590eab53 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2567452 Commit-Queue: Daniel Hosseinian <dhoss@chromium.org> Reviewed-by:Tom Sepez <tsepez@chromium.org> Cr-Commit-Position: refs/heads/master@{#833068}
Showing
Please register or sign in to comment