From f1b5bc38314cfc9a55ef35f768877a592ec371e3 Mon Sep 17 00:00:00 2001 From: Pavel Krajcevski Date: Wed, 12 Mar 2014 13:18:56 -0400 Subject: [PATCH] Use references to images from image loader. In general, we should really copy the images with the built-in Clone() function, but then we'd need to manage memory, etc. To avoid that headache, we can simply just use references. --- CLTool/src/compare.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CLTool/src/compare.cpp b/CLTool/src/compare.cpp index 93e1a8d..46c91db 100644 --- a/CLTool/src/compare.cpp +++ b/CLTool/src/compare.cpp @@ -77,8 +77,8 @@ int main(int argc, char **argv) { return 1; } - FasTC::Image<> img1(*img1f.GetImage()); - FasTC::Image<> img2(*img2f.GetImage()); + FasTC::Image<> &img1 = *img1f.GetImage(); + FasTC::Image<> &img2 = *img2f.GetImage(); double PSNR = img1.ComputePSNR(&img2); if(PSNR > 0.0) {