[Nit] Silence more minor warnings
* Silence -Wdeprecated-literal-operator * Silence -Wmissing-braces warning * Silence -Wbitwise-instead-of-logical warning * Silence -Wlogical-op-parentheses warning
This commit is contained in:
parent
e2bd23dfa0
commit
5834fe6abe
6 changed files with 18 additions and 16 deletions
|
|
@ -569,7 +569,7 @@ inline RenderPassBegin& RenderPassBegin::Framebuffer(VulkanFramebuffer* framebuf
|
|||
inline RenderPassBegin& RenderPassBegin::AddClearColor(float r, float g, float b, float a)
|
||||
{
|
||||
VkClearValue clearValue = { };
|
||||
clearValue.color = { r, g, b, a };
|
||||
clearValue.color = {{ r, g, b, a }};
|
||||
clearValues.push_back(clearValue);
|
||||
|
||||
renderPassInfo.clearValueCount = (uint32_t)clearValues.size();
|
||||
|
|
|
|||
|
|
@ -674,12 +674,12 @@ double Joy_ManageThumbstick(
|
|||
// Make the dead zone the new 0.
|
||||
ret_dist = (magnitude - deadzone) / (1.0 - deadzone);
|
||||
|
||||
const CubicBezier curve = {
|
||||
const CubicBezier curve = {{
|
||||
(float)((xy_lerp * curve_x.x1) + ((1.0 - xy_lerp) * curve_y.x1)),
|
||||
(float)((xy_lerp * curve_x.y1) + ((1.0 - xy_lerp) * curve_y.y1)),
|
||||
(float)((xy_lerp * curve_x.x2) + ((1.0 - xy_lerp) * curve_y.x2)),
|
||||
(float)((xy_lerp * curve_x.y2) + ((1.0 - xy_lerp) * curve_y.y2))
|
||||
};
|
||||
}};
|
||||
|
||||
ret_dist = Joy_ApplyResponseCurveBezier(curve, ret_dist);
|
||||
|
||||
|
|
|
|||
|
|
@ -1735,19 +1735,19 @@ using u32string_view = basic_string_view<char32_t>;
|
|||
using wstring_view = basic_string_view<wchar_t>;
|
||||
namespace literals
|
||||
{
|
||||
constexpr string_view operator"" _sv(const char* str, std::size_t s)
|
||||
constexpr string_view operator ""_sv(const char* str, std::size_t s)
|
||||
{
|
||||
return {str, s};
|
||||
}
|
||||
constexpr u16string_view operator"" _sv(const char16_t* str, std::size_t s)
|
||||
constexpr u16string_view operator ""_sv(const char16_t* str, std::size_t s)
|
||||
{
|
||||
return {str, s};
|
||||
}
|
||||
constexpr u32string_view operator"" _sv(const char32_t* str, std::size_t s)
|
||||
constexpr u32string_view operator ""_sv(const char32_t* str, std::size_t s)
|
||||
{
|
||||
return {str, s};
|
||||
}
|
||||
constexpr wstring_view operator"" _sv(const wchar_t* str, std::size_t s)
|
||||
constexpr wstring_view operator ""_sv(const wchar_t* str, std::size_t s)
|
||||
{
|
||||
return {str, s};
|
||||
}
|
||||
|
|
@ -1807,22 +1807,22 @@ return make_matcher(std::forward<Pattern>(pattern), cards<container_item_t<Patte
|
|||
}
|
||||
namespace literals
|
||||
{
|
||||
constexpr auto operator"" _wc(const char* str, std::size_t s)
|
||||
constexpr auto operator ""_wc(const char* str, std::size_t s)
|
||||
-> decltype(make_matcher(cx::make_string_view(str, s + 1)))
|
||||
{
|
||||
return make_matcher(cx::make_string_view(str, s + 1));
|
||||
}
|
||||
constexpr auto operator"" _wc(const char16_t* str, std::size_t s)
|
||||
constexpr auto operator ""_wc(const char16_t* str, std::size_t s)
|
||||
-> decltype(make_matcher(cx::make_string_view(str, s + 1)))
|
||||
{
|
||||
return make_matcher(cx::make_string_view(str, s + 1));
|
||||
}
|
||||
constexpr auto operator"" _wc(const char32_t* str, std::size_t s)
|
||||
constexpr auto operator ""_wc(const char32_t* str, std::size_t s)
|
||||
-> decltype(make_matcher(cx::make_string_view(str, s + 1)))
|
||||
{
|
||||
return make_matcher(cx::make_string_view(str, s + 1));
|
||||
}
|
||||
constexpr auto operator"" _wc(const wchar_t* str, std::size_t s)
|
||||
constexpr auto operator ""_wc(const wchar_t* str, std::size_t s)
|
||||
-> decltype(make_matcher(cx::make_string_view(str, s + 1)))
|
||||
{
|
||||
return make_matcher(cx::make_string_view(str, s + 1));
|
||||
|
|
|
|||
|
|
@ -3459,8 +3459,9 @@ static int D_InitGame(const FIWADInfo* iwad_info, std::vector<std::string>& allw
|
|||
// [RH] Add any .deh and .bex files on the command line.
|
||||
// If there are none, try adding any in the config file.
|
||||
// Note that the command line overrides defaults from the config.
|
||||
|
||||
if ((ConsiderPatches("-deh") | ConsiderPatches("-bex")) == 0 &&
|
||||
bool foundDeh = ConsiderPatches("-deh");
|
||||
bool foundBex = ConsiderPatches("-bex");
|
||||
if (!foundDeh && !foundBex &&
|
||||
gameinfo.gametype == GAME_Doom && GameConfig->SetSection ("Doom.DefaultDehacked"))
|
||||
{
|
||||
const char *key;
|
||||
|
|
|
|||
|
|
@ -1445,8 +1445,8 @@ DEFINE_ACTION_FUNCTION(AActor, LookForEnemiesEx)
|
|||
|
||||
while (it.Next(&cres))
|
||||
{
|
||||
if (cres.thing->player == nullptr && ValidEnemyInBlock(cres.thing, self, params) ||
|
||||
!noPlayers && cres.thing->player && isTargetablePlayer(self, cres.thing->player, allaround, params))
|
||||
if ((cres.thing->player == nullptr && ValidEnemyInBlock(cres.thing, self, params)) ||
|
||||
(!noPlayers && cres.thing->player && isTargetablePlayer(self, cres.thing->player, allaround, params)))
|
||||
targets->Push(cres.thing);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6355,7 +6355,8 @@ int P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, double
|
|||
if (!(flags & RADF_NODAMAGE) && !(bombspot->flags3 & MF3_BLOODLESSIMPACT))
|
||||
P_TraceBleed(newdam > 0 ? newdam : damage, thing, bombspot);
|
||||
|
||||
if ((flags & RADF_NODAMAGE && !(flags & RADF_THRUSTLESS)) || !(bombspot->flags2 & MF2_NODMGTHRUST) && !(flags & RADF_THRUSTLESS))
|
||||
if ((flags & RADF_NODAMAGE && !(flags & RADF_THRUSTLESS)) ||
|
||||
(!(bombspot->flags2 & MF2_NODMGTHRUST) && !(flags & RADF_THRUSTLESS)))
|
||||
{
|
||||
if (bombsource == NULL || !(bombsource->flags2 & MF2_NODMGTHRUST))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue