From da87b5727ac72b524b381a2801a5a5f52024f2b1 Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Tue, 30 Jul 2013 11:01:08 +0200 Subject: Fix rangeUnion return value in the successful case Even if the ranges can be merge rangeUnion was returning false. Most probably this was a typo. Change-Id: I4cf8a19bd701a8501c2d49cf0bfa996f9e12c02f --- emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emulator/opengl') diff --git a/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp b/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp index 5ba609b08..4b88a99f4 100644 --- a/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp +++ b/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp @@ -35,7 +35,7 @@ bool Range::rangeUnion(const Range& r,Range& rOut) const { int size = max_end - min_start; if(size) { rOut.setRange(min_start,max_end-min_start); - return false; + return true; } return false; } -- cgit v1.2.3 From 69f2fc8e6b4017605086aeab45bf1ad61bb66c7d Mon Sep 17 00:00:00 2001 From: Alessandro Pignotti Date: Tue, 30 Jul 2013 11:03:55 +0200 Subject: Ignore empty ranges Change-Id: I0cccba6795e3b9709cc646f6fa55bb60e6446ea1 --- emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'emulator/opengl') diff --git a/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp b/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp index 4b88a99f4..2d6f11932 100644 --- a/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp +++ b/emulator/opengl/host/libs/Translator/GLcommon/RangeManip.cpp @@ -41,7 +41,8 @@ bool Range::rangeUnion(const Range& r,Range& rOut) const { } void RangeList::addRange(const Range& r) { - list.push_back(r); + if(r.getSize()) + list.push_back(r); } void RangeList::addRanges(const RangeList& rl) { -- cgit v1.2.3