Remove a redundant call to GetRadioButtonAppStream(). Instead of calling GetRadioButtonAppStream() twice in a row, save and reuse the result from the first call. Change-Id: Id9b849e8cdc942b332cbb6ca59ed2800e245a3cd Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/66392 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_appstream.cpp b/fpdfsdk/cpdfsdk_appstream.cpp index 8157314..e451977 100644 --- a/fpdfsdk/cpdfsdk_appstream.cpp +++ b/fpdfsdk/cpdfsdk_appstream.cpp
@@ -1543,8 +1543,9 @@ ByteString csAP_D_OFF = csAP_D_ON; - csAP_N_ON += GetRadioButtonAppStream(rcClient, nStyle, crText); - csAP_D_ON += GetRadioButtonAppStream(rcClient, nStyle, crText); + ByteString app_stream = GetRadioButtonAppStream(rcClient, nStyle, crText); + csAP_N_ON += app_stream; + csAP_D_ON += app_stream; Write("N", csAP_N_ON, pControl->GetCheckedAPState()); Write("N", csAP_N_OFF, "Off");