[librsvg] push_new_viewport(): avoid a temporary variable



commit 13b74b9e1f37c7fb7df6d4b720ede6c21b679c21
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Feb 20 13:17:17 2019 -0600

    push_new_viewport(): avoid a temporary variable

 rsvg_internals/src/drawing_ctx.rs | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
---
diff --git a/rsvg_internals/src/drawing_ctx.rs b/rsvg_internals/src/drawing_ctx.rs
index de33bb82..b3904db4 100644
--- a/rsvg_internals/src/drawing_ctx.rs
+++ b/rsvg_internals/src/drawing_ctx.rs
@@ -245,15 +245,13 @@ impl DrawingCtx {
                 self.cr.transform(matrix);
 
                 if let Some(vbox) = vbox {
-                    let params = self.push_view_box(vbox.width, vbox.height);
-
                     if let Some(ref clip) = clip_mode {
                         if *clip == ClipMode::ClipToVbox {
                             self.clip(vbox.x, vbox.y, vbox.width, vbox.height);
                         }
                     }
 
-                    Some(params)
+                    Some(self.push_view_box(vbox.width, vbox.height))
                 } else {
                     Some(self.get_view_params())
                 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]