From 7132f71cf010e4f13eb27c1a24d8878aa984b43f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 29 Mar 2017 18:31:00 +0300 Subject: Remove extra memory copy in VirtFs::loadFile. Also add const into VirtFs::loadFile. --- src/integrity_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/integrity_unittest.cc') diff --git a/src/integrity_unittest.cc b/src/integrity_unittest.cc index aea7fe073..31157b0b6 100644 --- a/src/integrity_unittest.cc +++ b/src/integrity_unittest.cc @@ -76,7 +76,7 @@ static bool compareBuffers(const unsigned char *const buf2) { bool isCorrect(true); int sz = 0; - unsigned char *buf1 = reinterpret_cast( + const unsigned char *buf1 = reinterpret_cast( VirtFs::loadFile("hide.png", sz)); REQUIRE(buf1 != nullptr); REQUIRE(sz == 368); -- cgit v1.2.3-60-g2f50