2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #1032 from lioncash/swap

vfp: use std::swap where applicable
This commit is contained in:
bunnei 2015-08-16 00:20:35 -04:00
commit 5989a6ac57
2 changed files with 6 additions and 12 deletions

View file

@ -51,6 +51,7 @@
* ===========================================================================
*/
#include <algorithm>
#include "common/logging/log.h"
#include "core/arm/skyeye_common/vfp/vfp.h"
#include "core/arm/skyeye_common/vfp/vfp_helper.h"
@ -785,9 +786,7 @@ u32 vfp_double_add(struct vfp_double *vdd, struct vfp_double *vdn,struct vfp_dou
* This ensures that NaN propagation works correctly.
*/
if (vdn->exponent < vdm->exponent) {
struct vfp_double *t = vdn;
vdn = vdm;
vdm = t;
std::swap(vdm, vdn);
}
/*
@ -843,9 +842,7 @@ vfp_double_multiply(struct vfp_double *vdd, struct vfp_double *vdn,
* This ensures that NaN propagation works correctly.
*/
if (vdn->exponent < vdm->exponent) {
struct vfp_double *t = vdn;
vdn = vdm;
vdm = t;
std::swap(vdm, vdn);
LOG_TRACE(Core_ARM11, "VFP: swapping M <-> N\n");
}

View file

@ -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");
}