diff options
author | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 05:16:23 +0000 |
---|---|---|
committer | gman@chromium.org <gman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 05:16:23 +0000 |
commit | 3b6ec20aec909735d1f8b69c1088f256fe36c2a4 (patch) | |
tree | 39042b6f8402b8b7aac4d8bb6a2a8f565fd137ca /gpu/command_buffer/common/gles2_cmd_utils.h | |
parent | a6eb5232d2608cd0773bbe559757bd52c7f53670 (diff) | |
download | chromium_src-3b6ec20aec909735d1f8b69c1088f256fe36c2a4.zip chromium_src-3b6ec20aec909735d1f8b69c1088f256fe36c2a4.tar.gz chromium_src-3b6ec20aec909735d1f8b69c1088f256fe36c2a4.tar.bz2 |
Reverting previous CL.
Sure would be nice if the trybots actually worked
TEST=none
BUG=none
Review URL: http://codereview.chromium.org/668136
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40715 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/common/gles2_cmd_utils.h')
-rw-r--r-- | gpu/command_buffer/common/gles2_cmd_utils.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gpu/command_buffer/common/gles2_cmd_utils.h b/gpu/command_buffer/common/gles2_cmd_utils.h index 318d2d8..c5cd792 100644 --- a/gpu/command_buffer/common/gles2_cmd_utils.h +++ b/gpu/command_buffer/common/gles2_cmd_utils.h @@ -18,13 +18,12 @@ namespace gles2 { // returns true. template <typename T> inline bool SafeMultiply(T a, T b, T* dst) { + *dst = 0; if (b == 0) { - *dst = 0; return true; } T v = a * b; if (v / b != a) { - *dst = 0; return false; } *dst = v; @@ -39,8 +38,8 @@ inline bool SafeMultiplyUint32(uint32 a, uint32 b, uint32* dst) { // Does an add checking for overflow. If there was no overflow returns true. template <typename T> inline bool SafeAdd(T a, T b, T* dst) { + *dst = 0; if (a + b < a) { - *dst = 0; return false; } *dst = a + b; |