diff options
| author | Jason Sams <rjsams@android.com> | 2010-06-24 17:56:34 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-06-24 17:56:34 -0700 |
| commit | c9b8d1ca3e02d1bd06b08e8f64a01be9270a880e (patch) | |
| tree | de6d411da8dec1d0f120c1d73b428086b9fd9c51 /scriptc | |
| parent | 7fe6bce13c30b8d14dc833e06468666d28e56ee1 (diff) | |
| download | android_frameworks_rs-c9b8d1ca3e02d1bd06b08e8f64a01be9270a880e.tar.gz android_frameworks_rs-c9b8d1ca3e02d1bd06b08e8f64a01be9270a880e.tar.bz2 android_frameworks_rs-c9b8d1ca3e02d1bd06b08e8f64a01be9270a880e.zip | |
Fix return values for rsClamp.
Change-Id: Ic9980a2304797a74392c729d6b8ec9f477a906d6
Diffstat (limited to 'scriptc')
| -rw-r--r-- | scriptc/rs_core.rsh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scriptc/rs_core.rsh b/scriptc/rs_core.rsh index 91b30b91..463550f8 100644 --- a/scriptc/rs_core.rsh +++ b/scriptc/rs_core.rsh @@ -480,22 +480,22 @@ rsMatrixMultiply(rs_matrix2x2 *m, float2 in) { // int ops ///////////////////////////////////////////////////// -__inline__ static float __attribute__((overloadable, always_inline)) rsClamp(uint amount, uint low, uint high) { +__inline__ static uint __attribute__((overloadable, always_inline)) rsClamp(uint amount, uint low, uint high) { return amount < low ? low : (amount > high ? high : amount); } -__inline__ static float __attribute__((overloadable, always_inline)) rsClamp(int amount, int low, int high) { +__inline__ static int __attribute__((overloadable, always_inline)) rsClamp(int amount, int low, int high) { return amount < low ? low : (amount > high ? high : amount); } -__inline__ static float __attribute__((overloadable, always_inline)) rsClamp(ushort amount, ushort low, ushort high) { +__inline__ static ushort __attribute__((overloadable, always_inline)) rsClamp(ushort amount, ushort low, ushort high) { return amount < low ? low : (amount > high ? high : amount); } -__inline__ static float __attribute__((overloadable, always_inline)) rsClamp(short amount, short low, short high) { +__inline__ static short __attribute__((overloadable, always_inline)) rsClamp(short amount, short low, short high) { return amount < low ? low : (amount > high ? high : amount); } -__inline__ static float __attribute__((overloadable, always_inline)) rsClamp(uchar amount, uchar low, uchar high) { +__inline__ static uchar __attribute__((overloadable, always_inline)) rsClamp(uchar amount, uchar low, uchar high) { return amount < low ? low : (amount > high ? high : amount); } -__inline__ static float __attribute__((overloadable, always_inline)) rsClamp(char amount, char low, char high) { +__inline__ static char __attribute__((overloadable, always_inline)) rsClamp(char amount, char low, char high) { return amount < low ? low : (amount > high ? high : amount); } |
