mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Formatting cleanup for VideoCommon.
Block braces on new lines. Also killed off trailing whitespace and dangling elses. Spaced some things out to make them more readable (only in places where it looked like a bit of a clusterfuck).
This commit is contained in:
@ -62,23 +62,30 @@ public:
|
||||
_PIXELSHADERUID(const _PIXELSHADERUID& r)
|
||||
{
|
||||
num_values = r.num_values;
|
||||
if (safe) memcpy(values, r.values, PIXELSHADERUID_MAX_VALUES_SAFE);
|
||||
else memcpy(values, r.values, r.GetNumValues() * sizeof(values[0]));
|
||||
|
||||
if (safe)
|
||||
memcpy(values, r.values, PIXELSHADERUID_MAX_VALUES_SAFE);
|
||||
else
|
||||
memcpy(values, r.values, r.GetNumValues() * sizeof(values[0]));
|
||||
}
|
||||
|
||||
int GetNumValues() const
|
||||
{
|
||||
if (safe) return (sizeof(values) / sizeof(u32));
|
||||
else return num_values;
|
||||
if (safe)
|
||||
return (sizeof(values) / sizeof(u32));
|
||||
else
|
||||
return num_values;
|
||||
}
|
||||
|
||||
bool operator <(const _PIXELSHADERUID& _Right) const
|
||||
{
|
||||
int N = GetNumValues();
|
||||
|
||||
if (N < _Right.GetNumValues())
|
||||
return true;
|
||||
else if (N > _Right.GetNumValues())
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
if (values[i] < _Right.values[i])
|
||||
@ -86,22 +93,27 @@ public:
|
||||
else if (values[i] > _Right.values[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator ==(const _PIXELSHADERUID& _Right) const
|
||||
{
|
||||
int N = GetNumValues();
|
||||
|
||||
if (N != _Right.GetNumValues())
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < N; ++i)
|
||||
{
|
||||
if (values[i] != _Right.values[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
typedef _PIXELSHADERUID<false> PIXELSHADERUID;
|
||||
typedef _PIXELSHADERUID<true> PIXELSHADERUIDSAFE;
|
||||
|
||||
|
Reference in New Issue
Block a user