Commit 0333c3e7 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Compute center_x only when needed

parent dcc21591
Pipeline #357 passed with stages
in 1 minute and 50 seconds
......@@ -982,11 +982,11 @@ sc_search(girara_session_t* session, girara_argument_t* argument,
/* compute the center of the rectangle, which will be aligned to the center
of the viewport */
double center_x = (rectangle.x1 + rectangle.x2) / 2;
double center_y = (rectangle.y1 + rectangle.y2) / 2;
const double center_y = (rectangle.y1 + rectangle.y2) / 2;
pos_y += (center_y - (double)cell_height/2) / (double)doc_height;
if (search_hadjust == true) {
const double center_x = (rectangle.x1 + rectangle.x2) / 2;
pos_x += (center_x - (double)cell_width/2) / (double)doc_width;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment