diff options
| author | bunnei <bunneidev@gmail.com> | 2015-08-16 00:20:35 -0400 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2015-08-16 00:20:35 -0400 |
| commit | 5989a6ac5719504d60ed991ed5392e1da2297ed9 (patch) | |
| tree | 4f03d85d35559f5e3b09399cfd6fd340c4a1fa39 /src/core/arm/skyeye_common/vfp/vfpsingle.cpp | |
| parent | 2e5696dba4056a40239e68f3646ec328be531ad7 (diff) | |
| parent | 46b0277cbf2c9f17df8a91f2e0c9e1850a200072 (diff) | |
Merge pull request #1032 from lioncash/swap
vfp: use std::swap where applicable
Diffstat (limited to 'src/core/arm/skyeye_common/vfp/vfpsingle.cpp')
| -rw-r--r-- | src/core/arm/skyeye_common/vfp/vfpsingle.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp index e5d339252..0fb3c3bf1 100644 --- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp @@ -51,6 +51,7 @@ * =========================================================================== */ +#include <algorithm> #include <cinttypes> #include "common/common_funcs.h" @@ -815,9 +816,7 @@ vfp_single_add(struct vfp_single *vsd, struct vfp_single *vsn, * This ensures that NaN propagation works correctly. */ if (vsn->exponent < vsm->exponent) { - struct vfp_single *t = vsn; - vsn = vsm; - vsm = t; + std::swap(vsm, vsn); } /* @@ -872,9 +871,7 @@ vfp_single_multiply(struct vfp_single *vsd, struct vfp_single *vsn, struct vfp_s * This ensures that NaN propagation works correctly. */ if (vsn->exponent < vsm->exponent) { - struct vfp_single *t = vsn; - vsn = vsm; - vsm = t; + std::swap(vsm, vsn); LOG_TRACE(Core_ARM11, "swapping M <-> N"); } |
