Use condition instead of assertion #5030

This commit is contained in:
Jerry (Xinyu Hou) 2015-10-19 12:34:29 -07:00
parent ebec92fd5b
commit 4f1f2dcff0
1 changed files with 8 additions and 8 deletions

View File

@ -39,8 +39,7 @@ void DpiHelper::calculateDpi(size_t width, size_t height)
size_t dpiTest1 = s_resolutionWidth * 100 / width;
size_t dpiTest2 = s_resolutionHeight * 100 / height;
assert(dpiTest1 == dpiTest2);
if (dpiTest1 == dpiTest2) {
s_dpi = dpiTest1;
if (s_dpi != kDefaultDpi) {
@ -50,3 +49,4 @@ void DpiHelper::calculateDpi(size_t width, size_t height)
LOG((CLOG_DEBUG "physical resolution: %d, %d scaled resolution: %d, %d", s_resolutionWidth, s_resolutionHeight, width, height));
}
}
}