mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Remove UNUSED
The `UNUSED` macro is used to mark a variable as unused but with a name. Those usages are replaced with comments so that `UNUSED` can be removed. https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rf-unused
This commit is contained in:
parent
dd26f3a802
commit
891908b801
127 changed files with 355 additions and 340 deletions
|
|
@ -73,7 +73,7 @@ FColladaErrorHandler::~FColladaErrorHandler()
|
|||
FUError::RemoveErrorCallback(FUError::ERROR_LEVEL, this, &FColladaErrorHandler::OnError);
|
||||
}
|
||||
|
||||
void FColladaErrorHandler::OnError(FUError::Level errorLevel, uint32 errorCode, uint32 UNUSED(lineNumber))
|
||||
void FColladaErrorHandler::OnError(FUError::Level errorLevel, uint32 errorCode, uint32 /*lineNumber*/)
|
||||
{
|
||||
// Ignore warnings about missing materials, since we ignore materials entirely anyway
|
||||
if (errorCode == FUError::WARNING_INVALID_POLYGON_MAT_SYMBOL)
|
||||
|
|
@ -111,7 +111,7 @@ void FColladaDocument::LoadFromText(const char *text)
|
|||
REQUIRE_SUCCESS(status);
|
||||
}
|
||||
|
||||
void FColladaDocument::ReadExtras(xmlNode* UNUSED(colladaNode))
|
||||
void FColladaDocument::ReadExtras(xmlNode* /*colladaNode*/)
|
||||
{
|
||||
// TODO: This was needed to recognise and load XSI models.
|
||||
// XSI support should be reintroduced some time, but this function
|
||||
|
|
|
|||
|
|
@ -991,7 +991,7 @@ void CXMLReader::ReadPaths(XMBElement parent)
|
|||
}
|
||||
}
|
||||
|
||||
void CXMLReader::ReadTriggers(XMBElement UNUSED(parent))
|
||||
void CXMLReader::ReadTriggers(XMBElement /*parent*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ CMiniMapTexture::~CMiniMapTexture()
|
|||
DestroyTextures();
|
||||
}
|
||||
|
||||
void CMiniMapTexture::Update(const float UNUSED(deltaRealTime))
|
||||
void CMiniMapTexture::Update(const float /*deltaRealTime*/)
|
||||
{
|
||||
if (m_WaterHeight != g_Renderer.GetSceneRenderer().GetWaterManager().m_WaterHeight)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -151,7 +151,7 @@ public:
|
|||
* Called when the entity tries to set some variable to affect the display of this model
|
||||
* and/or its child objects.
|
||||
*/
|
||||
virtual void SetEntityVariable(const std::string& UNUSED(name), float UNUSED(value)) { }
|
||||
virtual void SetEntityVariable(const std::string& /*name*/, float /*value*/) { }
|
||||
|
||||
/**
|
||||
* Ensure that both the transformation and the bone matrices are correct for this model and all its props.
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ public:
|
|||
|
||||
std::unique_ptr<CModelAbstract> Clone() const override;
|
||||
|
||||
void SetTerrainDirty(ssize_t UNUSED(i0), ssize_t UNUSED(j0), ssize_t UNUSED(i1), ssize_t UNUSED(j1)) override
|
||||
void SetTerrainDirty(ssize_t /*i0*/, ssize_t /*j0*/, ssize_t /*i1*/, ssize_t /*j1*/) override
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ struct BufferOutputHandler : public nvtt::OutputHandler
|
|||
{
|
||||
std::vector<u8> buffer;
|
||||
|
||||
virtual void beginImage(int UNUSED(size), int UNUSED(width), int UNUSED(height), int UNUSED(depth), int UNUSED(face), int UNUSED(miplevel))
|
||||
virtual void beginImage(int /*size*/, int /*width*/, int /*height*/, int /*depth*/, int /*face*/,
|
||||
int /*miplevel*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,13 +235,13 @@ bool CGUI::ParseString<CGUISpriteInstance>(const CGUI*, const CStrW& Value, CGUI
|
|||
}
|
||||
|
||||
template <>
|
||||
bool CGUI::ParseString<CGUISeries>(const CGUI*, const CStrW& UNUSED(Value), CGUISeries& UNUSED(Output))
|
||||
bool CGUI::ParseString<CGUISeries>(const CGUI*, const CStrW& /*Value*/, CGUISeries& /*Output*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool CGUI::ParseString<CGUIList>(const CGUI*, const CStrW& UNUSED(Value), CGUIList& UNUSED(Output))
|
||||
bool CGUI::ParseString<CGUIList>(const CGUI*, const CStrW& /*Value*/, CGUIList& /*Output*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -191,7 +191,7 @@ public:
|
|||
* @param mouse current mouse position
|
||||
* @return True if mouse positions are hovering the button
|
||||
*/
|
||||
virtual bool HoveringButtonMinus(const CVector2D& UNUSED(mouse)) { return false; }
|
||||
virtual bool HoveringButtonMinus(const CVector2D& /*mouse*/) { return false; }
|
||||
|
||||
/**
|
||||
* Hovering the scroll plus button
|
||||
|
|
@ -199,7 +199,7 @@ public:
|
|||
* @param mouse current mouse position
|
||||
* @return True if mouse positions are hovering the button
|
||||
*/
|
||||
virtual bool HoveringButtonPlus(const CVector2D& UNUSED(mouse)) { return false; }
|
||||
virtual bool HoveringButtonPlus(const CVector2D& /*mouse*/) { return false; }
|
||||
|
||||
/**
|
||||
* Get scroll-position
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ protected:
|
|||
* Notice 'false' is default, because an object not using this function, should not
|
||||
* have any additional children (and this function should never be called).
|
||||
*/
|
||||
virtual bool HandleAdditionalChildren(const XMBData& UNUSED(file), const XMBElement& UNUSED(child))
|
||||
virtual bool HandleAdditionalChildren(const XMBData& /*file*/, const XMBElement& /*child*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ CVector2D CMiniMap::WorldSpaceToMiniMapSpace(const CVector3D& worldPosition) con
|
|||
m_CachedActualSize.bottom - (0.5f + rotatedY) * m_CachedActualSize.GetHeight());
|
||||
}
|
||||
|
||||
bool CMiniMap::FireWorldClickEvent(int button, int UNUSED(clicks))
|
||||
bool CMiniMap::FireWorldClickEvent(int button, int /*clicks*/)
|
||||
{
|
||||
ScriptRequest rq(g_GUI->GetActiveGUI()->GetScriptInterface());
|
||||
|
||||
|
|
|
|||
|
|
@ -169,48 +169,48 @@ protected:
|
|||
// We provide defaults that do nothing (some raise JS exceptions).
|
||||
|
||||
// The JS code will see undefined when querying a property descriptor.
|
||||
virtual bool getOwnPropertyDescriptor(JSContext*, JS::HandleObject UNUSED(proxy), JS::HandleId,
|
||||
virtual bool getOwnPropertyDescriptor(JSContext*, JS::HandleObject /*proxy*/, JS::HandleId,
|
||||
JS::MutableHandle<mozilla::Maybe<JS::PropertyDescriptor>>) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Throw an exception is JS code attempts defining a property.
|
||||
virtual bool defineProperty(JSContext*, JS::HandleObject UNUSED(proxy), JS::HandleId,
|
||||
JS::Handle<JS::PropertyDescriptor>, JS::ObjectOpResult& UNUSED(result)) const override
|
||||
virtual bool defineProperty(JSContext*, JS::HandleObject /*proxy*/, JS::HandleId,
|
||||
JS::Handle<JS::PropertyDescriptor>, JS::ObjectOpResult& /*result*/) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// No accessible properties.
|
||||
virtual bool ownPropertyKeys(JSContext*, JS::HandleObject UNUSED(proxy),
|
||||
JS::MutableHandleIdVector UNUSED(props)) const override
|
||||
virtual bool ownPropertyKeys(JSContext*, JS::HandleObject /*proxy*/,
|
||||
JS::MutableHandleIdVector) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Nothing to enumerate.
|
||||
virtual bool enumerate(JSContext*, JS::HandleObject UNUSED(proxy),
|
||||
JS::MutableHandleIdVector UNUSED(props)) const override
|
||||
virtual bool enumerate(JSContext*, JS::HandleObject /*proxy*/,
|
||||
JS::MutableHandleIdVector /*props*/) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// Throw an exception is JS attempts to query the prototype.
|
||||
virtual bool getPrototypeIfOrdinary(JSContext*, JS::HandleObject UNUSED(proxy),
|
||||
bool* UNUSED(isOrdinary), JS::MutableHandleObject UNUSED(protop)) const override
|
||||
virtual bool getPrototypeIfOrdinary(JSContext*, JS::HandleObject /*proxy*/, bool* /*isOrdinary*/,
|
||||
JS::MutableHandleObject /*protop*/) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Throw an exception - no prototype to set.
|
||||
virtual bool setImmutablePrototype(JSContext*, JS::HandleObject UNUSED(proxy),
|
||||
bool* UNUSED(succeeded)) const override
|
||||
virtual bool setImmutablePrototype(JSContext*, JS::HandleObject /*proxy*/,
|
||||
bool* /*succeeded*/) const override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// We are not extensible.
|
||||
virtual bool preventExtensions(JSContext*, JS::HandleObject UNUSED(proxy),
|
||||
JS::ObjectOpResult&) const override
|
||||
virtual bool preventExtensions(JSContext*, JS::HandleObject /*proxy*/,
|
||||
JS::ObjectOpResult& /*result*/) const override
|
||||
{
|
||||
return true;
|
||||
}
|
||||
virtual bool isExtensible(JSContext*, JS::HandleObject UNUSED(proxy), bool* extensible) const override
|
||||
virtual bool isExtensible(JSContext*, JS::HandleObject /*proxy*/, bool* extensible) const override
|
||||
{
|
||||
*extensible = false;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -167,7 +167,8 @@ std::unique_ptr<IGUIProxyObject> JSI_GUIProxy<T>::CreateJSObject(const ScriptReq
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
bool JSI_GUIProxy<T>::get(JSContext* cx, JS::HandleObject proxy, JS::HandleValue UNUSED(receiver), JS::HandleId id, JS::MutableHandleValue vp) const
|
||||
bool JSI_GUIProxy<T>::get(JSContext* cx, JS::HandleObject proxy, JS::HandleValue /*receiver*/,
|
||||
JS::HandleId id, JS::MutableHandleValue vp) const
|
||||
{
|
||||
ScriptRequest rq(cx);
|
||||
|
||||
|
|
@ -237,7 +238,7 @@ bool JSI_GUIProxy<T>::get(JSContext* cx, JS::HandleObject proxy, JS::HandleValue
|
|||
|
||||
template <typename T>
|
||||
bool JSI_GUIProxy<T>::set(JSContext* cx, JS::HandleObject proxy, JS::HandleId id, JS::HandleValue vp,
|
||||
JS::HandleValue UNUSED(receiver), JS::ObjectOpResult& result) const
|
||||
JS::HandleValue /*receiver*/, JS::ObjectOpResult& result) const
|
||||
{
|
||||
T* e = IGUIProxyObject::FromPrivateSlot<T>(proxy.get());
|
||||
if (!e)
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@ class Divider_Naive
|
|||
{
|
||||
public:
|
||||
Divider_Naive() {} // needed for default CacheEntry ctor
|
||||
Divider_Naive(float UNUSED(x)) {}
|
||||
Divider_Naive(float /*x*/) {}
|
||||
float operator()(float val, float divisor) const
|
||||
{
|
||||
return val / divisor;
|
||||
|
|
@ -524,7 +524,7 @@ class Divider_Recip
|
|||
public:
|
||||
Divider_Recip() {} // needed for default CacheEntry ctor
|
||||
Divider_Recip(float x) { recip = 1.0f / x; }
|
||||
float operator()(float val, float UNUSED(divisor)) const
|
||||
float operator()(float val, float /*divisor*/) const
|
||||
{
|
||||
return val * recip;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ public:
|
|||
return maxCapacity;
|
||||
}
|
||||
|
||||
bool Expand(size_t UNUSED(requiredCapacity))
|
||||
bool Expand(size_t /*requiredCapacity*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
@ -297,7 +297,7 @@ public:
|
|||
return maxCapacity;
|
||||
}
|
||||
|
||||
bool Expand(size_t UNUSED(requiredCapacity))
|
||||
bool Expand(size_t /*requiredCapacity*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ static void def_bundle_logs(FILE*)
|
|||
}
|
||||
|
||||
|
||||
static ErrorReactionInternal def_display_error(const wchar_t* UNUSED(text), size_t UNUSED(flags))
|
||||
static ErrorReactionInternal def_display_error(const wchar_t* /*text*/, size_t /*flags*/)
|
||||
{
|
||||
return ERI_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,13 +32,6 @@
|
|||
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
* mark a function parameter as unused and avoid
|
||||
* the corresponding compiler warning.
|
||||
* wrap around the parameter name, e.g. void f(int UNUSED(x))
|
||||
**/
|
||||
#define UNUSED(param)
|
||||
|
||||
/**
|
||||
* mark a function local variable or parameter as unused and avoid
|
||||
* the corresponding compiler warning.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2020 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -213,17 +213,17 @@ wchar_t* debug_stl_simplify_name(wchar_t* name)
|
|||
template<class Container>
|
||||
struct ContainerBase : public Container
|
||||
{
|
||||
bool IsValid(size_t UNUSED(el_size)) const
|
||||
bool IsValid(size_t /*el_size*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t NumElements(size_t UNUSED(el_size)) const
|
||||
size_t NumElements(size_t /*el_size*/) const
|
||||
{
|
||||
return this->size();
|
||||
}
|
||||
|
||||
static const u8* DereferenceAndAdvance(typename Container::iterator& it, size_t UNUSED(el_size))
|
||||
static const u8* DereferenceAndAdvance(typename Container::iterator& it, size_t /*el_size*/)
|
||||
{
|
||||
const u8* p = (const u8*)&*it;
|
||||
++it;
|
||||
|
|
@ -309,12 +309,12 @@ struct Any_tree : public std::_Tree<_Traits>
|
|||
{
|
||||
}
|
||||
|
||||
bool IsValid(size_t UNUSED(el_size)) const
|
||||
bool IsValid(size_t /*el_size*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
size_t NumElements(size_t UNUSED(el_size)) const
|
||||
size_t NumElements(size_t /*el_size*/) const
|
||||
{
|
||||
return size();
|
||||
}
|
||||
|
|
@ -397,7 +397,7 @@ struct Any_multiset: public Any_set
|
|||
|
||||
struct Any_vector: public ContainerBase<std::vector<int> >
|
||||
{
|
||||
bool IsValid(size_t UNUSED(el_size)) const
|
||||
bool IsValid(size_t /*el_size*/) const
|
||||
{
|
||||
// more elements reported than reserved
|
||||
if(size() > capacity())
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -319,7 +319,7 @@ public:
|
|||
return m_file->Pathname();
|
||||
}
|
||||
|
||||
virtual Status Load(const OsPath& UNUSED(name), const std::shared_ptr<u8>& buf, size_t size) const
|
||||
virtual Status Load(const OsPath& /*name*/, const std::shared_ptr<u8>& buf, size_t size) const
|
||||
{
|
||||
AdjustOffset();
|
||||
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public:
|
|||
|
||||
private:
|
||||
static void ArchiveEntryCallback(const VfsPath& path, const CFileInfo&, PIArchiveFile,
|
||||
uintptr_t UNUSED(cbData))
|
||||
uintptr_t /*cbData*/)
|
||||
{
|
||||
g_ResultBuffer = path.string8();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class ScopedIoMonitor
|
|||
public:
|
||||
ScopedIoMonitor() {}
|
||||
~ScopedIoMonitor() {}
|
||||
void NotifyOfSuccess(FileIOImplentation, int UNUSED(opcode), off_t UNUSED(size)) {}
|
||||
void NotifyOfSuccess(FileIOImplentation, int /*opcode*/, off_t /*size*/) {}
|
||||
};
|
||||
#define stats_cb_start()
|
||||
#define stats_cb_finish()
|
||||
|
|
|
|||
|
|
@ -104,16 +104,16 @@ std::wstring TraceEntry::EncodeAsText() const
|
|||
class Trace_Dummy : public ITrace
|
||||
{
|
||||
public:
|
||||
Trace_Dummy(size_t UNUSED(maxSize))
|
||||
Trace_Dummy(size_t /*maxSize*/)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
virtual void NotifyLoad(const Path&, size_t UNUSED(size))
|
||||
virtual void NotifyLoad(const Path&, size_t /*size*/)
|
||||
{
|
||||
}
|
||||
|
||||
virtual void NotifyStore(const Path&, size_t UNUSED(size))
|
||||
virtual void NotifyStore(const Path&, size_t /*size*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ struct DefaultCompletedHook
|
|||
* allows progress notification and processing data while waiting for
|
||||
* previous I/Os to complete.
|
||||
**/
|
||||
Status operator()(const u8* UNUSED(block), size_t UNUSED(blockSize)) const
|
||||
Status operator()(const u8* /*block*/, size_t /*blockSize*/) const
|
||||
{
|
||||
return INFO::OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -40,7 +40,10 @@ public:
|
|||
size_t Precedence() const { return m_Precedence; }
|
||||
wchar_t LocationCode() const { return L'\0'; }
|
||||
OsPath Path() const { return L"";}
|
||||
Status Load(const OsPath& UNUSED(name), const std::shared_ptr<u8>& UNUSED(buf), size_t UNUSED(size)) const {return INFO::OK; }
|
||||
Status Load(const OsPath& /*name*/, const std::shared_ptr<u8>& /*buf*/, size_t /*size*/) const
|
||||
{
|
||||
return INFO::OK;
|
||||
}
|
||||
};
|
||||
|
||||
class TestVfsTree : public CxxTest::TestSuite
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -294,20 +294,20 @@ static void GLAD_API_PTR dummy_glDrawRangeElementsEXT(GLenum mode, GLuint, GLuin
|
|||
glDrawElements(mode, count, type, indices);
|
||||
}
|
||||
|
||||
static void GLAD_API_PTR dummy_glActiveTextureARB(GLenum UNUSED(texture))
|
||||
static void GLAD_API_PTR dummy_glActiveTextureARB(GLenum /*texture*/)
|
||||
{
|
||||
}
|
||||
|
||||
static void GLAD_API_PTR dummy_glClientActiveTextureARB(GLenum UNUSED(texture))
|
||||
static void GLAD_API_PTR dummy_glClientActiveTextureARB(GLenum /*texture*/)
|
||||
{
|
||||
}
|
||||
|
||||
static void GLAD_API_PTR dummy_glMultiTexCoord2fARB(GLenum UNUSED(target), GLfloat s, GLfloat t)
|
||||
static void GLAD_API_PTR dummy_glMultiTexCoord2fARB(GLenum /*target*/, GLfloat s, GLfloat t)
|
||||
{
|
||||
glTexCoord2f(s, t);
|
||||
}
|
||||
|
||||
static void GLAD_API_PTR dummy_glMultiTexCoord3fARB(GLenum UNUSED(target), GLfloat s, GLfloat t, GLfloat r)
|
||||
static void GLAD_API_PTR dummy_glMultiTexCoord3fARB(GLenum /*target*/, GLfloat s, GLfloat t, GLfloat r)
|
||||
{
|
||||
glTexCoord3f(s, t, r);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -53,7 +53,7 @@ static Status GetAndValidateApicIds()
|
|||
numIds = os_cpu_NumProcessors();
|
||||
struct StoreEachProcessorsApicId
|
||||
{
|
||||
static void Callback(size_t processor, uintptr_t UNUSED(data))
|
||||
static void Callback(size_t processor, uintptr_t /*data*/)
|
||||
{
|
||||
processorApicIds[processor] = GetApicId();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -111,7 +111,7 @@ size_t os_cpu_MemoryAvailable()
|
|||
return memoryAvailable;
|
||||
}
|
||||
|
||||
uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t UNUSED(processorMask))
|
||||
uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t /*processorMask*/)
|
||||
{
|
||||
// not yet implemented
|
||||
return os_cpu_ProcessorMask();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2012 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
#include <execinfo.h>
|
||||
|
||||
void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
void* debug_GetCaller(void* /*context*/, const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
// bt[0] == this function
|
||||
// bt[1] == our caller
|
||||
|
|
@ -49,7 +49,7 @@ void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSki
|
|||
return bt[2];
|
||||
}
|
||||
|
||||
Status debug_DumpStack(wchar_t* buf, size_t max_chars, void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
Status debug_DumpStack(wchar_t* buf, size_t max_chars, void* /*context*/, const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
static const size_t N_FRAMES = 16;
|
||||
void *bt[N_FRAMES];
|
||||
|
|
@ -123,7 +123,7 @@ Status debug_ResolveSymbol(void* ptr_of_interest, wchar_t* sym_name, wchar_t* fi
|
|||
}
|
||||
}
|
||||
|
||||
void debug_SetThreadName(char const* UNUSED(name))
|
||||
void debug_SetThreadName(char const* /*name*/)
|
||||
{
|
||||
// Currently unimplemented
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -105,7 +105,7 @@ size_t os_cpu_MemoryAvailable()
|
|||
// the current Android NDK (r7-crystax-4) doesn't support sched_setaffinity,
|
||||
// so provide a stub implementation instead
|
||||
|
||||
uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t UNUSED(processorMask))
|
||||
uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t /*processorMask*/)
|
||||
{
|
||||
// not yet implemented
|
||||
return os_cpu_ProcessorMask();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -42,17 +42,19 @@
|
|||
// Android NDK doesn't support backtrace()
|
||||
// TODO: use unwind.h or similar?
|
||||
|
||||
void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
void* debug_GetCaller(void* /*context*/, const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Status debug_DumpStack(wchar_t* UNUSED(buf), size_t UNUSED(max_chars), void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
Status debug_DumpStack(wchar_t* /*buf*/, size_t /*max_chars*/, void* /*context*/,
|
||||
const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
return ERR::NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
Status debug_ResolveSymbol(void* UNUSED(ptr_of_interest), wchar_t* UNUSED(sym_name), wchar_t* UNUSED(file), int* UNUSED(line))
|
||||
Status debug_ResolveSymbol(void* /*ptr_of_interest*/, wchar_t* /*sym_name*/, wchar_t* /*file*/,
|
||||
int* /*line*/)
|
||||
{
|
||||
return ERR::NOT_SUPPORTED;
|
||||
}
|
||||
|
|
@ -61,7 +63,7 @@ Status debug_ResolveSymbol(void* UNUSED(ptr_of_interest), wchar_t* UNUSED(sym_na
|
|||
|
||||
#include <execinfo.h>
|
||||
|
||||
void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
void* debug_GetCaller(void* /*context*/, const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
// bt[0] == this function
|
||||
// bt[1] == our caller
|
||||
|
|
@ -75,7 +77,7 @@ void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSki
|
|||
return bt[2];
|
||||
}
|
||||
|
||||
Status debug_DumpStack(wchar_t* buf, size_t max_chars, void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
Status debug_DumpStack(wchar_t* buf, size_t max_chars, void* /*context*/, const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
static const size_t N_FRAMES = 16;
|
||||
void *bt[N_FRAMES];
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ static bool CanRunNotifications()
|
|||
#define kFSEventStreamEventFlagItemModified 0x00001000
|
||||
#endif
|
||||
|
||||
static void fsevent_callback(ConstFSEventStreamRef, void * UNUSED(clientCallBackInfo), size_t numEvents,
|
||||
static void fsevent_callback(ConstFSEventStreamRef, void* /*clientCallBackInfo*/, size_t numEvents,
|
||||
void *eventPaths, const FSEventStreamEventFlags eventFlags[], const FSEventStreamEventId[])
|
||||
{
|
||||
unsigned long i;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -100,7 +100,7 @@ size_t os_cpu_MemoryAvailable()
|
|||
}
|
||||
|
||||
|
||||
uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t UNUSED(processorMask))
|
||||
uintptr_t os_cpu_SetThreadAffinityMask(uintptr_t /*processorMask*/)
|
||||
{
|
||||
// not yet implemented. when doing so, see http://developer.apple.com/releasenotes/Performance/RN-AffinityAPI/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -30,17 +30,19 @@
|
|||
|
||||
#include <pthread.h>
|
||||
|
||||
void* debug_GetCaller(void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
void* debug_GetCaller(void* /*context*/, const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Status debug_DumpStack(wchar_t* UNUSED(buf), size_t UNUSED(max_chars), void* UNUSED(context), const wchar_t* UNUSED(lastFuncToSkip))
|
||||
Status debug_DumpStack(wchar_t* /*buf*/, size_t /*max_chars*/, void* /*context*/,
|
||||
const wchar_t* /*lastFuncToSkip*/)
|
||||
{
|
||||
return ERR::NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
Status debug_ResolveSymbol(void* UNUSED(ptr_of_interest), wchar_t* UNUSED(sym_name), wchar_t* UNUSED(file), int* UNUSED(line))
|
||||
Status debug_ResolveSymbol(void* /*ptr_of_interest*/, wchar_t* /*sym_name*/, wchar_t* /*file*/,
|
||||
int* /*line*/)
|
||||
{
|
||||
return ERR::NOT_SUPPORTED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ symbol lookups and backtraces)
|
|||
#include "lib/utf8.h"
|
||||
|
||||
|
||||
Status debug_CaptureContext(void* UNUSED(context))
|
||||
Status debug_CaptureContext(void* /*context*/)
|
||||
{
|
||||
// (not needed unless/until we support stack traces)
|
||||
return INFO::SKIPPED;
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ void sys_display_msg(const wchar_t* caption, const wchar_t* msg)
|
|||
}
|
||||
|
||||
#if OS_MACOSX || OS_ANDROID
|
||||
static ErrorReactionInternal try_gui_display_error(const wchar_t* UNUSED(text), bool UNUSED(manual_break), bool UNUSED(allow_suppress), bool UNUSED(no_continue))
|
||||
static ErrorReactionInternal try_gui_display_error(const wchar_t* /*text*/, bool /*manual_break*/,
|
||||
bool /*allow_suppress*/, bool /*no_continue*/)
|
||||
{
|
||||
// TODO: implement this, in a way that doesn't rely on X11
|
||||
// and doesn't occasionally cause crazy errors like
|
||||
|
|
@ -343,7 +344,7 @@ Status sys_generate_random_bytes(u8* buf, size_t count)
|
|||
return INFO::OK;
|
||||
}
|
||||
|
||||
Status sys_get_proxy_config(const std::wstring& UNUSED(url), std::wstring& UNUSED(proxy))
|
||||
Status sys_get_proxy_config(const std::wstring& /*url*/, std::wstring& /*proxy*/)
|
||||
{
|
||||
return INFO::SKIPPED;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -31,7 +31,7 @@ size_t numa_NumNodes()
|
|||
return 1;
|
||||
}
|
||||
|
||||
size_t numa_NodeFromProcessor(size_t UNUSED(processor))
|
||||
size_t numa_NodeFromProcessor(size_t /*processor*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ static const int mmap_flags = MAP_PRIVATE|MAP_ANONYMOUS;
|
|||
|
||||
namespace vm {
|
||||
|
||||
void* ReserveAddressSpace(size_t size, size_t UNUSED(commitSize), PageType UNUSED(pageType), int UNUSED(prot))
|
||||
void* ReserveAddressSpace(size_t size, size_t /*commitSize*/, PageType /*pageType*/, int /*prot*/)
|
||||
{
|
||||
errno = 0;
|
||||
void* p = mmap(0, size, PROT_NONE, mmap_flags|MAP_NORESERVE, -1, 0);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
static void* callers[100];
|
||||
static size_t numCallers;
|
||||
|
||||
static Status OnFrame(const _tagSTACKFRAME64* frame, uintptr_t UNUSED(cbData))
|
||||
static Status OnFrame(const _tagSTACKFRAME64* frame, uintptr_t /*cbData*/)
|
||||
{
|
||||
callers[numCallers++] = (void*)frame->AddrPC.Offset;
|
||||
return INFO::OK;
|
||||
|
|
|
|||
|
|
@ -1092,7 +1092,7 @@ static Status dump_sym_enum(DWORD type_id, const u8* p, DumpState& state)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static Status dump_sym_function(DWORD UNUSED(type_id), const u8* UNUSED(p), DumpState&)
|
||||
static Status dump_sym_function(DWORD /*type_id*/, const u8* /*p*/, DumpState&)
|
||||
{
|
||||
return INFO::SYM_SUPPRESS_OUTPUT;
|
||||
}
|
||||
|
|
@ -1100,7 +1100,7 @@ static Status dump_sym_function(DWORD UNUSED(type_id), const u8* UNUSED(p), Dump
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static Status dump_sym_function_type(DWORD UNUSED(type_id), const u8* p, DumpState& state)
|
||||
static Status dump_sym_function_type(DWORD /*type_id*/, const u8* p, DumpState& state)
|
||||
{
|
||||
// this symbol gives class parent, return type, and parameter count.
|
||||
// unfortunately the one thing we care about, its name,
|
||||
|
|
@ -1376,7 +1376,8 @@ not_handle:
|
|||
}
|
||||
|
||||
|
||||
static Status udt_dump_suppressed(const wchar_t* type_name, const u8* UNUSED(p), size_t UNUSED(size), DumpState state, ULONG UNUSED(numChildren), const DWORD* UNUSED(children))
|
||||
static Status udt_dump_suppressed(const wchar_t* type_name, const u8* /*p*/, size_t /*size*/,
|
||||
DumpState state, ULONG /*numChildren*/, const DWORD* /*children*/)
|
||||
{
|
||||
if(!udt_should_suppress(type_name))
|
||||
return INFO::CANNOT_HANDLE;
|
||||
|
|
@ -1552,7 +1553,7 @@ done:
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
static Status dump_sym_vtable(DWORD UNUSED(type_id), const u8* UNUSED(p), DumpState&)
|
||||
static Status dump_sym_vtable(DWORD /*type_id*/, const u8* /*p*/, DumpState&)
|
||||
{
|
||||
// unsupported (vtable internals are undocumented; too much work).
|
||||
return INFO::SYM_SUPPRESS_OUTPUT;
|
||||
|
|
@ -1562,7 +1563,7 @@ static Status dump_sym_vtable(DWORD UNUSED(type_id), const u8* UNUSED(p), DumpSt
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
static Status dump_sym_unknown(DWORD type_id, const u8* UNUSED(p), DumpState& state)
|
||||
static Status dump_sym_unknown(DWORD type_id, const u8* /*p*/, DumpState& state)
|
||||
{
|
||||
// redundant (already done in dump_sym), but this is rare.
|
||||
DWORD type_tag;
|
||||
|
|
@ -1640,7 +1641,7 @@ static bool ShouldSkipSymbol(const wchar_t* name)
|
|||
|
||||
// output the symbol's name and value via dump_sym*.
|
||||
// called from dump_frame_cb for each local symbol; lock is held.
|
||||
static BOOL CALLBACK dump_sym_cb(SYMBOL_INFOW* sym, ULONG UNUSED(size), PVOID userContext)
|
||||
static BOOL CALLBACK dump_sym_cb(SYMBOL_INFOW* sym, ULONG /*size*/, PVOID userContext)
|
||||
{
|
||||
if(ShouldSkipSymbol(sym->Name))
|
||||
return TRUE; // continue
|
||||
|
|
@ -1661,7 +1662,7 @@ static BOOL CALLBACK dump_sym_cb(SYMBOL_INFOW* sym, ULONG UNUSED(size), PVOID us
|
|||
}
|
||||
|
||||
// called by wdbg_sym_WalkStack for each stack frame
|
||||
static Status dump_frame_cb(const STACKFRAME64* sf, uintptr_t UNUSED(userContext))
|
||||
static Status dump_frame_cb(const STACKFRAME64* sf, uintptr_t /*userContext*/)
|
||||
{
|
||||
void* func = (void*)(uintptr_t)sf->AddrPC.Offset;
|
||||
|
||||
|
|
|
|||
|
|
@ -357,7 +357,7 @@ int pthread_mutex_unlock(pthread_mutex_t* m)
|
|||
|
||||
// not implemented - pthread_mutex is based on CRITICAL_SECTION,
|
||||
// which doesn't support timeouts. use sem_timedwait instead.
|
||||
int pthread_mutex_timedlock(pthread_mutex_t*, const struct timespec* UNUSED(abs_timeout))
|
||||
int pthread_mutex_timedlock(pthread_mutex_t*, const struct timespec* /*abs_timeout*/)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
|
|
@ -437,7 +437,7 @@ int sem_close(sem_t* sem)
|
|||
return 0; // success
|
||||
}
|
||||
|
||||
int sem_unlink(const char* UNUSED(name))
|
||||
int sem_unlink(const char* /*name*/)
|
||||
{
|
||||
// see sem_close
|
||||
return 0; // success
|
||||
|
|
@ -567,7 +567,7 @@ static unsigned __stdcall thread_start(void* param)
|
|||
}
|
||||
|
||||
|
||||
int pthread_create(pthread_t* thread_id, const void* UNUSED(attr), void* (*func)(void*), void* arg)
|
||||
int pthread_create(pthread_t* thread_id, const void* /*attr*/, void* (*func)(void*), void* arg)
|
||||
{
|
||||
// notes:
|
||||
// - use wutil_Allocate instead of the normal heap because we /might/
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ void sys_display_msg(const wchar_t* caption, const wchar_t* msg)
|
|||
static POINTS dlg_clientOrigin;
|
||||
static POINTS dlg_prevClientSize;
|
||||
|
||||
static void dlg_OnMove(HWND UNUSED(hDlg), int x, int y)
|
||||
static void dlg_OnMove(HWND /*hDlg*/, int x, int y)
|
||||
{
|
||||
dlg_clientOrigin.x = (short)x;
|
||||
dlg_clientOrigin.y = (short)y;
|
||||
|
|
@ -165,7 +165,7 @@ static void dlg_OnSize(HWND hDlg, UINT state, int clientSizeX, int clientSizeY)
|
|||
}
|
||||
|
||||
|
||||
static void dlg_OnGetMinMaxInfo(HWND UNUSED(hDlg), LPMINMAXINFO mmi)
|
||||
static void dlg_OnGetMinMaxInfo(HWND /*hDlg*/, LPMINMAXINFO mmi)
|
||||
{
|
||||
// we must make sure resize_control will never set negative coords -
|
||||
// Windows would clip them, and its real position would be lost.
|
||||
|
|
@ -181,7 +181,7 @@ struct DialogParams
|
|||
size_t flags;
|
||||
};
|
||||
|
||||
static BOOL dlg_OnInitDialog(HWND hDlg, HWND UNUSED(hWndFocus), LPARAM lParam)
|
||||
static BOOL dlg_OnInitDialog(HWND hDlg, HWND /*hWndFocus*/, LPARAM lParam)
|
||||
{
|
||||
const DialogParams* params = reinterpret_cast<const DialogParams*>(lParam);
|
||||
SetWindowLongPtr(hDlg, DWLP_USER, lParam);
|
||||
|
|
@ -214,7 +214,7 @@ static BOOL dlg_OnInitDialog(HWND hDlg, HWND UNUSED(hWndFocus), LPARAM lParam)
|
|||
}
|
||||
|
||||
|
||||
static void dlg_OnCommand(HWND hDlg, int id, HWND UNUSED(hWndCtl), UINT UNUSED(codeNotify))
|
||||
static void dlg_OnCommand(HWND hDlg, int id, HWND /*hWndCtl*/, UINT /*codeNotify*/)
|
||||
{
|
||||
switch(id)
|
||||
{
|
||||
|
|
@ -259,7 +259,7 @@ static void dlg_OnClose(HWND hDlg)
|
|||
}
|
||||
|
||||
|
||||
static void dlg_OnSysCommand(HWND hDlg, UINT cmd, int UNUSED(x), int UNUSED(y))
|
||||
static void dlg_OnSysCommand(HWND hDlg, UINT cmd, int /*x*/, int /*y*/)
|
||||
{
|
||||
switch(cmd & 0xFFF0) // NB: lower 4 bits are reserved
|
||||
{
|
||||
|
|
@ -444,7 +444,7 @@ std::wstring sys_get_user_name()
|
|||
|
||||
// callback for shell directory picker: used to set starting directory
|
||||
// (for user convenience).
|
||||
static int CALLBACK BrowseCallback(HWND hWnd, unsigned int msg, LPARAM UNUSED(lParam), LPARAM lpData)
|
||||
static int CALLBACK BrowseCallback(HWND hWnd, unsigned int msg, LPARAM /*lParam*/, LPARAM lpData)
|
||||
{
|
||||
if(msg == BFFM_INITIALIZED)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ public:
|
|||
}
|
||||
|
||||
template<typename Field>
|
||||
void operator()(size_t flags, Field& field, const char* UNUSED(name), const char* UNUSED(units))
|
||||
void operator()(size_t flags, Field& field, const char* /*name*/, const char* /*units*/)
|
||||
{
|
||||
if((flags & F_DERIVED) || data >= end)
|
||||
{
|
||||
|
|
@ -210,7 +210,8 @@ private:
|
|||
|
||||
// (this specialization avoids a "forcing value to bool true or false" warning)
|
||||
template<>
|
||||
void FieldInitializer::operator()<bool>(size_t flags, bool& UNUSED(t), const char* UNUSED(name), const char* UNUSED(units))
|
||||
void FieldInitializer::operator()<bool>(size_t flags, bool& /*t*/, const char* /*name*/,
|
||||
const char* /*units*/)
|
||||
{
|
||||
// SMBIOS doesn't specify any individual booleans, so we're only called for
|
||||
// derived fields and don't need to do anything.
|
||||
|
|
@ -218,7 +219,8 @@ void FieldInitializer::operator()<bool>(size_t flags, bool& UNUSED(t), const cha
|
|||
}
|
||||
|
||||
template<>
|
||||
void FieldInitializer::operator()<const char*>(size_t flags, const char*& t, const char* UNUSED(name), const char* UNUSED(units))
|
||||
void FieldInitializer::operator()<const char*>(size_t flags, const char*& t, const char* /*name*/,
|
||||
const char* /*units*/)
|
||||
{
|
||||
t = 0; // (allow immediate `return' when the string is found to be invalid)
|
||||
|
||||
|
|
@ -472,7 +474,7 @@ static Status InitStructures()
|
|||
// StringFromEnum
|
||||
|
||||
template<class Enum>
|
||||
std::string StringFromEnum(Enum UNUSED(field))
|
||||
std::string StringFromEnum(Enum /*field*/)
|
||||
{
|
||||
return "(unknown enumeration)";
|
||||
}
|
||||
|
|
@ -592,7 +594,7 @@ private:
|
|||
|
||||
// enumerations and bit flags
|
||||
template<typename Field>
|
||||
void Write(size_t UNUSED(flags), Field& field, const char* name, const char* units, typename Field::Enum*)
|
||||
void Write(size_t /*flags*/, Field& field, const char* name, const char* units, typename Field::Enum*)
|
||||
{
|
||||
// 0 usually means "not included in structure", but some packed
|
||||
// enumerations actually use that value. therefore, only skip this
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -157,7 +157,7 @@ public:
|
|||
{
|
||||
public:
|
||||
Mock_dladdr(const std::string& fname) : fname_(fname) { }
|
||||
int dladdr(void *UNUSED(addr), Dl_info *info) {
|
||||
int dladdr(void* /*addr*/, Dl_info *info) {
|
||||
info->dli_fname = fname_.c_str();
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -55,8 +55,8 @@ private:
|
|||
int old_mode;
|
||||
_invalid_parameter_handler old_handler;
|
||||
|
||||
static void invalid_parameter_handler(const wchar_t* UNUSED(expression), const wchar_t* UNUSED(function),
|
||||
const wchar_t* UNUSED(file), unsigned int UNUSED(line), uintptr_t UNUSED(pReserved))
|
||||
static void invalid_parameter_handler(const wchar_t* /*expression*/, const wchar_t* /*function*/,
|
||||
const wchar_t* /*file*/, unsigned int /*line*/, uintptr_t /*pReserved*/)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -669,7 +669,8 @@ u32 Tex::get_average_color() const
|
|||
}
|
||||
|
||||
|
||||
static void add_level_size(size_t UNUSED(level), size_t UNUSED(level_w), size_t UNUSED(level_h), const u8* RESTRICT UNUSED(level_data), size_t level_dataSize, void* RESTRICT cbData)
|
||||
static void add_level_size(size_t /*level*/, size_t /*level_w*/, size_t /*level_h*/,
|
||||
const u8* RESTRICT /*level_data*/, size_t level_dataSize, void* RESTRICT cbData)
|
||||
{
|
||||
size_t* ptotal_size = (size_t*)cbData;
|
||||
*ptotal_size += level_dataSize;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ struct BmpHeader
|
|||
#define BI_RGB 0 // biCompression
|
||||
|
||||
|
||||
Status TexCodecBmp::transform(Tex*, size_t UNUSED(transforms)) const
|
||||
Status TexCodecBmp::transform(Tex*, size_t /*transforms*/) const
|
||||
{
|
||||
return INFO::TEX_CODEC_CANNOT_HANDLE;
|
||||
}
|
||||
|
|
@ -95,7 +95,7 @@ size_t TexCodecBmp::hdr_size(const u8* file) const
|
|||
|
||||
|
||||
// requirements: uncompressed, direct color, bottom up
|
||||
Status TexCodecBmp::decode(u8* RESTRICT data, size_t UNUSED(size), Tex* RESTRICT t) const
|
||||
Status TexCodecBmp::decode(u8* RESTRICT data, size_t /*size*/, Tex* RESTRICT t) const
|
||||
{
|
||||
const BmpHeader* hdr = (const BmpHeader*)data;
|
||||
const long w = (long)read_le32(&hdr->biWidth);
|
||||
|
|
|
|||
|
|
@ -226,7 +226,7 @@ struct S3tcDecompressInfo
|
|||
u8* out;
|
||||
};
|
||||
|
||||
static void s3tc_decompress_level(size_t UNUSED(level), size_t level_w, size_t level_h,
|
||||
static void s3tc_decompress_level(size_t /*level*/, size_t level_w, size_t level_h,
|
||||
const u8* RESTRICT level_data, size_t level_data_size, void* RESTRICT cbData)
|
||||
{
|
||||
S3tcDecompressInfo* di = (S3tcDecompressInfo*)cbData;
|
||||
|
|
@ -603,13 +603,13 @@ bool TexCodecDds::is_ext(const OsPath& extension) const
|
|||
}
|
||||
|
||||
|
||||
size_t TexCodecDds::hdr_size(const u8* UNUSED(file)) const
|
||||
size_t TexCodecDds::hdr_size(const u8* /*file*/) const
|
||||
{
|
||||
return 4+sizeof(DDS_HEADER);
|
||||
}
|
||||
|
||||
|
||||
Status TexCodecDds::decode(u8* RESTRICT data, size_t UNUSED(size), Tex* RESTRICT t) const
|
||||
Status TexCodecDds::decode(u8* RESTRICT data, size_t /*size*/, Tex* RESTRICT t) const
|
||||
{
|
||||
const DDS_HEADER* sd = (const DDS_HEADER*)(data+4);
|
||||
RETURN_STATUS_IF_ERR(decode_sd(sd, t->m_Width, t->m_Height, t->m_Bpp, t->m_Flags));
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ static void io_flush(png_structp)
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Status TexCodecPng::transform(Tex*, size_t UNUSED(transforms)) const
|
||||
Status TexCodecPng::transform(Tex*, size_t /*transforms*/) const
|
||||
{
|
||||
return INFO::TEX_CODEC_CANNOT_HANDLE;
|
||||
}
|
||||
|
|
@ -252,7 +252,7 @@ bool TexCodecPng::is_ext(const OsPath& extension) const
|
|||
}
|
||||
|
||||
|
||||
size_t TexCodecPng::hdr_size(const u8* UNUSED(file)) const
|
||||
size_t TexCodecPng::hdr_size(const u8* /*file*/) const
|
||||
{
|
||||
return 0; // libpng returns decoded image data; no header
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ TgaHeader;
|
|||
#pragma pack(pop)
|
||||
|
||||
|
||||
Status TexCodecTga::transform(Tex*, size_t UNUSED(transforms)) const
|
||||
Status TexCodecTga::transform(Tex*, size_t /*transforms*/) const
|
||||
{
|
||||
return INFO::TEX_CODEC_CANNOT_HANDLE;
|
||||
}
|
||||
|
|
@ -112,7 +112,7 @@ size_t TexCodecTga::hdr_size(const u8* file) const
|
|||
|
||||
|
||||
// requirements: uncompressed, direct color, bottom up
|
||||
Status TexCodecTga::decode(u8* RESTRICT data, size_t UNUSED(size), Tex* RESTRICT t) const
|
||||
Status TexCodecTga::decode(u8* RESTRICT data, size_t /*size*/, Tex* RESTRICT t) const
|
||||
{
|
||||
const TgaHeader* hdr = (const TgaHeader*)data;
|
||||
const u8 type = hdr->img_type;
|
||||
|
|
|
|||
|
|
@ -673,7 +673,7 @@ JS::Value XmppClient::GUIGetProfile(const ScriptRequest& rq)
|
|||
* Message interfaces *
|
||||
*****************************************************/
|
||||
|
||||
void SetGUIMessageProperty(const ScriptRequest&, JS::HandleObject UNUSED(messageObj))
|
||||
void SetGUIMessageProperty(const ScriptRequest&, JS::HandleObject /*messageObj*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2017 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -219,7 +219,8 @@ void TNSpline::AddNode(const CFixedVector3D& pos, const CFixedVector3D& rotation
|
|||
}
|
||||
|
||||
//Inserts node before position
|
||||
void TNSpline::InsertNode(const int index, const CFixedVector3D& pos, const CFixedVector3D& UNUSED(rotation), fixed timePeriod)
|
||||
void TNSpline::InsertNode(const int index, const CFixedVector3D& pos, const CFixedVector3D& /*rotation*/,
|
||||
fixed timePeriod)
|
||||
{
|
||||
if (NodeCount >= MAX_SPLINE_NODES || index < 0 || index > NodeCount)
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -79,7 +79,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void Put(const char* name, const u8* UNUSED(data), size_t len)
|
||||
void Put(const char* name, const u8* /*data*/, size_t len)
|
||||
{
|
||||
#if DEBUG_SERIALIZER_ANNOTATE
|
||||
m_Length += 2; // '<' and '>'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2019 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -119,7 +119,7 @@ CStr CNetStatsTable::GetCellText(size_t row, size_t col)
|
|||
#undef ROW
|
||||
}
|
||||
|
||||
AbstractProfileTable* CNetStatsTable::GetChild(size_t UNUSED(row))
|
||||
AbstractProfileTable* CNetStatsTable::GetChild(size_t /*row*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ thread_local std::shared_ptr<ScriptContext> g_ScriptContext;
|
|||
bool g_InDevelopmentCopy;
|
||||
bool g_CheckedIfInDevelopmentCopy = false;
|
||||
|
||||
ErrorReactionInternal psDisplayError(const wchar_t* UNUSED(text), size_t UNUSED(flags))
|
||||
ErrorReactionInternal psDisplayError(const wchar_t* /*text*/, size_t /*flags*/)
|
||||
{
|
||||
// If we're fullscreen, then sometimes (at least on some particular drivers on Linux)
|
||||
// displaying the error dialog hangs the desktop since the dialog box is behind the
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining
|
||||
* a copy of this software and associated documentation files (the
|
||||
|
|
@ -186,7 +186,8 @@ size_t ModIo::DownloadCallback(void* buffer, size_t size, size_t nmemb, void* us
|
|||
return written;
|
||||
}
|
||||
|
||||
int ModIo::DownloadProgressCallback(void* clientp, curl_off_t dltotal, curl_off_t dlnow, curl_off_t UNUSED(ultotal), curl_off_t UNUSED(ulnow))
|
||||
int ModIo::DownloadProgressCallback(void* clientp, curl_off_t dltotal, curl_off_t dlnow,
|
||||
curl_off_t /*ultotal*/, curl_off_t /*ulnow*/)
|
||||
{
|
||||
DownloadProgressData* data = static_cast<DownloadProgressData*>(clientp);
|
||||
|
||||
|
|
|
|||
|
|
@ -776,7 +776,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void OnSync(double UNUSED(time))
|
||||
void OnSync(double /*time*/)
|
||||
{
|
||||
// Split the array of items into an array of array (arbitrarily splitting
|
||||
// around the sync points) to avoid array-too-large errors in JSON decoders
|
||||
|
|
|
|||
|
|
@ -70,9 +70,9 @@ public:
|
|||
class CDummyReplayLogger : public IReplayLogger
|
||||
{
|
||||
public:
|
||||
virtual void StartGame(JS::MutableHandleValue UNUSED(attribs)) { }
|
||||
virtual void Turn(u32 UNUSED(n), u32 UNUSED(turnLength), std::vector<SimulationCommand>&) { }
|
||||
virtual void Hash(const std::string& UNUSED(hash), bool UNUSED(quick)) { }
|
||||
virtual void StartGame(JS::MutableHandleValue /*attribs*/) { }
|
||||
virtual void Turn(u32 /*n*/, u32 /*turnLength*/, std::vector<SimulationCommand>&) { }
|
||||
virtual void Hash(const std::string& /*hash*/, bool /*quick*/) { }
|
||||
virtual void SaveMetadata(const CSimulation2&) { };
|
||||
virtual OsPath GetDirectory() const { return OsPath(); }
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -48,7 +48,7 @@ void ClearSchemaCache()
|
|||
g_SchemaCache.clear();
|
||||
}
|
||||
|
||||
static void relaxNGErrorHandler(void* UNUSED(userData),
|
||||
static void relaxNGErrorHandler(void* /*userData*/,
|
||||
std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error)
|
||||
{
|
||||
// Strip a trailing newline
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
static std::mutex g_ValidatorCacheLock;
|
||||
static std::map<const std::string, RelaxNGValidator> g_ValidatorCache;
|
||||
|
||||
static void errorHandler(void* UNUSED(userData),
|
||||
static void errorHandler(void* /*userData*/,
|
||||
std::conditional_t<LIBXML_VERSION >= 21200, const xmlError, xmlError>* error)
|
||||
{
|
||||
// Strip a trailing newline
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ int MikkTSpace::GetNumFaces(const SMikkTSpaceContext* pContext)
|
|||
return GetUserDataFromContext(pContext)->m_Model->GetNumFaces();
|
||||
}
|
||||
|
||||
int MikkTSpace::GetNumVerticesOfFace(const SMikkTSpaceContext*, const int UNUSED(iFace))
|
||||
int MikkTSpace::GetNumVerticesOfFace(const SMikkTSpaceContext*, const int /*iFace*/)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ void MikkTSpace::GetTexCoord(const SMikkTSpaceContext* pContext,
|
|||
|
||||
|
||||
void MikkTSpace::SetTSpace(const SMikkTSpaceContext* pContext, const float* fvTangent,
|
||||
const float* UNUSED(fvBiTangent), const float UNUSED(fMagS), const float UNUSED(fMagT),
|
||||
const float* /*fvBiTangent*/, const float /*fMagS*/, const float /*fMagT*/,
|
||||
const tbool bIsOrientationPreserving, const int iFace, const int iVert)
|
||||
{
|
||||
const MikkTSpace* userData = GetUserDataFromContext(pContext);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2021 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -113,8 +113,8 @@ private:
|
|||
* @param[in] iVert - Array containing the position vector of the face.
|
||||
*/
|
||||
static void SetTSpace(const SMikkTSpaceContext* pContext, const float* fvTangent,
|
||||
const float* UNUSED(fvBiTangent), const float UNUSED(fMagS), const float UNUSED(fMagT),
|
||||
const tbool bIsOrientationPreserving, const int iFace, const int iVert);
|
||||
const float* /*fvBiTangent*/, const float /*fMagS*/, const float /*fMagT*/,
|
||||
const tbool bIsOrientationPreserving, const int iFace, const int iVert);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ CStr CRendererStatsTable::GetCellText(size_t row, size_t col)
|
|||
}
|
||||
}
|
||||
|
||||
AbstractProfileTable* CRendererStatsTable::GetChild(size_t UNUSED(row))
|
||||
AbstractProfileTable* CRendererStatsTable::GetChild(size_t /*row*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ void CSceneRenderer::Initialize()
|
|||
}
|
||||
|
||||
// resize renderer view
|
||||
void CSceneRenderer::Resize(int UNUSED(width), int UNUSED(height))
|
||||
void CSceneRenderer::Resize(int /*width*/, int /*height*/)
|
||||
{
|
||||
// need to recreate the shadow map object to resize the shadow texture
|
||||
m->shadow.RecreateTexture();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2023 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -49,8 +49,7 @@ public:
|
|||
|
||||
virtual void RenderBeforeWater(Renderer::Backend::IDeviceCommandContext*) { }
|
||||
|
||||
virtual void RenderAfterWater(Renderer::Backend::IDeviceCommandContext*, int UNUSED(cullGroup)) { }
|
||||
|
||||
virtual void RenderAfterWater(Renderer::Backend::IDeviceCommandContext*, int /*cullGroup*/) { }
|
||||
/**
|
||||
* Draw all ITerrainOverlay objects that exist
|
||||
* and that should be drawn before water.
|
||||
|
|
|
|||
|
|
@ -92,9 +92,10 @@ std::unique_ptr<IVertexInputLayout> CDevice::CreateVertexInputLayout(
|
|||
}
|
||||
|
||||
std::unique_ptr<ITexture> CDevice::CreateTexture(
|
||||
const char* UNUSED(name), const CTexture::Type type, const uint32_t usage,
|
||||
const char* /*name*/, const CTexture::Type type, const uint32_t usage,
|
||||
const Format format, const uint32_t width, const uint32_t height,
|
||||
const Sampler::Desc& UNUSED(defaultSamplerDesc), const uint32_t MIPLevelCount, const uint32_t UNUSED(sampleCount))
|
||||
const Sampler::Desc& /*defaultSamplerDesc*/, const uint32_t MIPLevelCount,
|
||||
const uint32_t /*sampleCount*/)
|
||||
{
|
||||
return CTexture::Create(this, type, usage, format, width, height, MIPLevelCount);
|
||||
}
|
||||
|
|
@ -144,7 +145,7 @@ void CDevice::Present()
|
|||
// We have nothing to present.
|
||||
}
|
||||
|
||||
void CDevice::OnWindowResize(const uint32_t UNUSED(width), const uint32_t UNUSED(height))
|
||||
void CDevice::OnWindowResize(const uint32_t /*width*/, const uint32_t /*height*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -169,16 +170,16 @@ uint32_t CDevice::AllocateQuery()
|
|||
return 0;
|
||||
}
|
||||
|
||||
void CDevice::FreeQuery(const uint32_t UNUSED(handle))
|
||||
void CDevice::FreeQuery(const uint32_t /*handle*/)
|
||||
{
|
||||
}
|
||||
|
||||
bool CDevice::IsQueryResultAvailable(const uint32_t UNUSED(handle)) const
|
||||
bool CDevice::IsQueryResultAvailable(const uint32_t /*handle*/) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64_t CDevice::GetQueryResult(const uint32_t UNUSED(handle))
|
||||
uint64_t CDevice::GetQueryResult(const uint32_t /*handle*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -47,7 +47,7 @@ IDevice* CShaderProgram::GetDevice()
|
|||
return m_Device;
|
||||
}
|
||||
|
||||
int32_t CShaderProgram::GetBindingSlot(const CStrIntern UNUSED(name)) const
|
||||
int32_t CShaderProgram::GetBindingSlot(const CStrIntern /*name*/) const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ std::vector<std::string> GetExtensionsImpl()
|
|||
|
||||
void GLAD_API_PTR OnDebugMessage(
|
||||
GLenum source, GLenum type, GLuint id, GLenum severity,
|
||||
GLsizei UNUSED(length), const GLchar* message, const void* UNUSED(user_param))
|
||||
GLsizei /*length*/, const GLchar* message, const void* /*user_param*/)
|
||||
{
|
||||
std::string debugSource = "unknown";
|
||||
std::string debugType = "unknown";
|
||||
|
|
@ -1081,7 +1081,7 @@ bool CDevice::IsFramebufferFormatSupported(const Format format) const
|
|||
}
|
||||
|
||||
Format CDevice::GetPreferredDepthStencilFormat(
|
||||
const uint32_t UNUSED(usage), const bool depth, const bool stencil) const
|
||||
const uint32_t /*usage*/, const bool depth, const bool stencil) const
|
||||
{
|
||||
ENSURE(depth || stencil);
|
||||
if (stencil)
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ void CDeviceCommandContext::UploadBufferRegion(
|
|||
UploadDynamicBufferRegionImpl(target, buffer->GetSize(), dataOffset, dataSize, uploadFunction);
|
||||
}
|
||||
|
||||
void CDeviceCommandContext::InsertTimestampQuery(const uint32_t handle, const bool UNUSED(isScopeBegin))
|
||||
void CDeviceCommandContext::InsertTimestampQuery(const uint32_t handle, const bool /*isScopeBegin*/)
|
||||
{
|
||||
// GL can have the only one command context so we can call commands on
|
||||
// the deivce side.
|
||||
|
|
@ -1293,7 +1293,7 @@ void CDeviceCommandContext::Dispatch(
|
|||
}
|
||||
|
||||
void CDeviceCommandContext::InsertMemoryBarrier(
|
||||
const uint32_t UNUSED(srcStageMask), const uint32_t dstStageMask,
|
||||
const uint32_t /*srcStageMask*/, const uint32_t dstStageMask,
|
||||
const uint32_t srcAccessMask, const uint32_t dstAccessMask)
|
||||
{
|
||||
#if !CONFIG2_GLES
|
||||
|
|
|
|||
|
|
@ -457,7 +457,7 @@ public:
|
|||
return textureUnit;
|
||||
}
|
||||
|
||||
GLuint GetStorageBuffer(const int32_t UNUSED(bindingSlot)) override
|
||||
GLuint GetStorageBuffer(const int32_t /*bindingSlot*/) override
|
||||
{
|
||||
debug_warn("ARB shaders don't support storage buffers.");
|
||||
return 0;
|
||||
|
|
@ -1517,23 +1517,23 @@ std::unique_ptr<CShaderProgram> CShaderProgram::Create(CDevice* device, const CS
|
|||
// These should all be overridden by CShaderProgramGLSL
|
||||
// (GLES doesn't support any other types of shader program):
|
||||
|
||||
void CShaderProgram::VertexPointer(const Renderer::Backend::Format, GLsizei UNUSED(stride),
|
||||
const void* UNUSED(pointer))
|
||||
void CShaderProgram::VertexPointer(const Renderer::Backend::Format, GLsizei /*stride*/,
|
||||
const void* /*pointer*/)
|
||||
{
|
||||
debug_warn("CShaderProgram::VertexPointer should be overridden");
|
||||
}
|
||||
void CShaderProgram::NormalPointer(const Renderer::Backend::Format, GLsizei UNUSED(stride),
|
||||
const void* UNUSED(pointer))
|
||||
void CShaderProgram::NormalPointer(const Renderer::Backend::Format, GLsizei /*stride*/,
|
||||
const void* /*pointer*/)
|
||||
{
|
||||
debug_warn("CShaderProgram::NormalPointer should be overridden");
|
||||
}
|
||||
void CShaderProgram::ColorPointer(const Renderer::Backend::Format, GLsizei UNUSED(stride),
|
||||
const void* UNUSED(pointer))
|
||||
void CShaderProgram::ColorPointer(const Renderer::Backend::Format, GLsizei /*stride*/,
|
||||
const void* /*pointer*/)
|
||||
{
|
||||
debug_warn("CShaderProgram::ColorPointer should be overridden");
|
||||
}
|
||||
void CShaderProgram::TexCoordPointer(GLenum UNUSED(texture), const Renderer::Backend::Format,
|
||||
GLsizei UNUSED(stride), const void* UNUSED(pointer))
|
||||
void CShaderProgram::TexCoordPointer(GLenum /*texture*/, const Renderer::Backend::Format,
|
||||
GLsizei /*stride*/, const void* /*pointer*/)
|
||||
{
|
||||
debug_warn("CShaderProgram::TexCoordPointer should be overridden");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL DebugCallback(
|
|||
VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
|
||||
VkDebugUtilsMessageTypeFlagsEXT messageType,
|
||||
const VkDebugUtilsMessengerCallbackDataEXT* callbackData,
|
||||
void* UNUSED(userData))
|
||||
void* /*userData*/)
|
||||
{
|
||||
if ((messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT) || (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT))
|
||||
LOGMESSAGE("Vulkan: %s", callbackData->pMessage);
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ void CDeviceCommandContext::DrawIndexedInstanced(
|
|||
|
||||
void CDeviceCommandContext::DrawIndexedInRange(
|
||||
const uint32_t firstIndex, const uint32_t indexCount,
|
||||
const uint32_t UNUSED(start), const uint32_t UNUSED(end))
|
||||
const uint32_t /*start*/, const uint32_t /*end*/)
|
||||
{
|
||||
DrawIndexed(firstIndex, indexCount, 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2024 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -157,7 +157,7 @@ void CRingCommandContext::ScheduleUpload(
|
|||
}
|
||||
|
||||
void CRingCommandContext::ScheduleUpload(
|
||||
CTexture* texture, const Format UNUSED(dataFormat),
|
||||
CTexture* texture, const Format /*dataFormat*/,
|
||||
const void* data, const size_t dataSize,
|
||||
const uint32_t xOffset, const uint32_t yOffset,
|
||||
const uint32_t width, const uint32_t height,
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ CStr CScriptStatsTable::GetCellText(size_t row, size_t col)
|
|||
}
|
||||
}
|
||||
|
||||
AbstractProfileTable* CScriptStatsTable::GetChild(size_t UNUSED(row))
|
||||
AbstractProfileTable* CScriptStatsTable::GetChild(size_t /*row*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public:
|
|||
SetEnabled(m_Enabled);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ public:
|
|||
Init(paramNode);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -164,7 +164,7 @@ public:
|
|||
SerializeCommon(deserialize);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
deserialize.NumberFloat_Unbounded("speed z", m_SpeedZ);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -33,7 +33,8 @@ template<>
|
|||
struct SerializeHelper<ICmpObstructionManager::tag_t>
|
||||
{
|
||||
template<typename S>
|
||||
void operator()(S& serialize, const char* UNUSED(name), Serialize::qualify<S, ICmpObstructionManager::tag_t> value)
|
||||
void operator()(S& serialize, const char* /*name*/,
|
||||
Serialize::qualify<S, ICmpObstructionManager::tag_t> value)
|
||||
{
|
||||
serialize.NumberU32_Unbounded("tag", value.n);
|
||||
}
|
||||
|
|
@ -304,7 +305,7 @@ public:
|
|||
SerializeCommon(deserialize);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ template<>
|
|||
struct SerializeHelper<UnitShape>
|
||||
{
|
||||
template<typename S>
|
||||
void operator()(S& serialize, const char* UNUSED(name), Serialize::qualify<S, UnitShape> value) const
|
||||
void operator()(S& serialize, const char* /*name*/, Serialize::qualify<S, UnitShape> value) const
|
||||
{
|
||||
serialize.NumberU32_Unbounded("entity", value.entity);
|
||||
serialize.NumberFixed_Unbounded("x", value.x);
|
||||
|
|
@ -106,7 +106,7 @@ template<>
|
|||
struct SerializeHelper<StaticShape>
|
||||
{
|
||||
template<typename S>
|
||||
void operator()(S& serialize, const char* UNUSED(name), Serialize::qualify<S, StaticShape> value) const
|
||||
void operator()(S& serialize, const char* /*name*/, Serialize::qualify<S, StaticShape> value) const
|
||||
{
|
||||
serialize.NumberU32_Unbounded("entity", value.entity);
|
||||
serialize.NumberFixed_Unbounded("x", value.x);
|
||||
|
|
@ -223,7 +223,7 @@ public:
|
|||
m_UpdateInformations.dirtinessGrid = Grid<u8>(size, size);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ public:
|
|||
Init(paramNode);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage &msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage &msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
@ -151,7 +151,7 @@ public:
|
|||
UpdateMessageSubscriptions();
|
||||
}
|
||||
|
||||
void Interpolate(float UNUSED(frameTime), float frameOffset)
|
||||
void Interpolate(float /*frameTime*/, float frameOffset)
|
||||
{
|
||||
// Recompute our visibility if needed.
|
||||
if (m_LastStoredPlayerVisibility != GetSimContext().GetCurrentDisplayedPlayer())
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public:
|
|||
deserialize.NumberI32_Unbounded("owner", m_Owner);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ public:
|
|||
Init(paramNode);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ template<>
|
|||
struct SerializeHelper<LongPathRequest>
|
||||
{
|
||||
template<typename S>
|
||||
void operator()(S& serialize, const char* UNUSED(name), Serialize::qualify<S, LongPathRequest> value)
|
||||
void operator()(S& serialize, const char* /*name*/, Serialize::qualify<S, LongPathRequest> value)
|
||||
{
|
||||
serialize.NumberU32_Unbounded("ticket", value.ticket);
|
||||
serialize.NumberFixed_Unbounded("x0", value.x0);
|
||||
|
|
@ -133,7 +133,7 @@ template<>
|
|||
struct SerializeHelper<ShortPathRequest>
|
||||
{
|
||||
template<typename S>
|
||||
void operator()(S& serialize, const char* UNUSED(name), Serialize::qualify<S, ShortPathRequest> value)
|
||||
void operator()(S& serialize, const char* /*name*/, Serialize::qualify<S, ShortPathRequest> value)
|
||||
{
|
||||
serialize.NumberU32_Unbounded("ticket", value.ticket);
|
||||
serialize.NumberFixed_Unbounded("x0", value.x0);
|
||||
|
|
@ -169,7 +169,7 @@ void CCmpPathfinder::Deserialize(const CParamNode& paramNode, IDeserializer& des
|
|||
SerializeCommon(deserialize);
|
||||
}
|
||||
|
||||
void CCmpPathfinder::HandleMessage(const CMessage& msg, bool UNUSED(global))
|
||||
void CCmpPathfinder::HandleMessage(const CMessage& msg, bool /*global*/)
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
@ -957,7 +957,8 @@ bool CCmpPathfinder::CheckMovement(const IObstructionTestFilter& filter,
|
|||
}
|
||||
|
||||
ICmpObstruction::EFoundationCheck CCmpPathfinder::CheckUnitPlacement(const IObstructionTestFilter& filter,
|
||||
entity_pos_t x, entity_pos_t z, entity_pos_t r, pass_class_t passClass, bool UNUSED(onlyCenterPoint)) const
|
||||
entity_pos_t x, entity_pos_t z, entity_pos_t r, pass_class_t passClass,
|
||||
bool /*onlyCenterPoint*/) const
|
||||
{
|
||||
// Check unit obstruction
|
||||
CmpPtr<ICmpObstructionManager> cmpObstructionManager(GetSystemEntity());
|
||||
|
|
@ -991,7 +992,7 @@ ICmpObstruction::EFoundationCheck CCmpPathfinder::CheckBuildingPlacement(const I
|
|||
|
||||
ICmpObstruction::EFoundationCheck CCmpPathfinder::CheckBuildingPlacement(const IObstructionTestFilter& filter,
|
||||
entity_pos_t x, entity_pos_t z, entity_pos_t a, entity_pos_t w,
|
||||
entity_pos_t h, entity_id_t id, pass_class_t passClass, bool UNUSED(onlyCenterPoint)) const
|
||||
entity_pos_t h, entity_id_t id, pass_class_t passClass, bool /*onlyCenterPoint*/) const
|
||||
{
|
||||
// Check unit obstruction
|
||||
CmpPtr<ICmpObstructionManager> cmpObstructionManager(GetSystemEntity());
|
||||
|
|
|
|||
|
|
@ -781,7 +781,7 @@ public:
|
|||
pos1.Y += GetConstructionProgressOffset(pos1);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ public:
|
|||
deserialize.NumberU32_Unbounded("next id", m_NextId);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ void CCmpRallyPointRenderer::Deserialize(const CParamNode& paramNode, IDeseriali
|
|||
// The dependent components have not been deserialized, so the color is loaded on first SetDisplayed
|
||||
}
|
||||
|
||||
void CCmpRallyPointRenderer::HandleMessage(const CMessage& msg, bool UNUSED(global))
|
||||
void CCmpRallyPointRenderer::HandleMessage(const CMessage& msg, bool /*global*/)
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
void Serialize(ISerializer&) override;
|
||||
void Deserialize(const CParamNode& paramNode, IDeserializer&) override;
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override;
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override;
|
||||
|
||||
/*
|
||||
* Must be called whenever m_Displayed or the size of m_RallyPoints change,
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ template<>
|
|||
struct SerializeHelper<Query>
|
||||
{
|
||||
template<typename S>
|
||||
void Common(S& serialize, const char* UNUSED(name), Serialize::qualify<S, Query> value)
|
||||
void Common(S& serialize, const char* /*name*/, Serialize::qualify<S, Query> value)
|
||||
{
|
||||
serialize.NumberFixed_Unbounded("min range", value.minRange);
|
||||
serialize.NumberFixed_Unbounded("max range", value.maxRange);
|
||||
|
|
@ -327,7 +327,7 @@ template<>
|
|||
struct SerializeHelper<EntityData>
|
||||
{
|
||||
template<typename S>
|
||||
void operator()(S& serialize, const char* UNUSED(name), Serialize::qualify<S, EntityData> value)
|
||||
void operator()(S& serialize, const char* /*name*/, Serialize::qualify<S, EntityData> value)
|
||||
{
|
||||
serialize.NumberFixed_Unbounded("x", value.x);
|
||||
serialize.NumberFixed_Unbounded("z", value.z);
|
||||
|
|
@ -508,7 +508,7 @@ public:
|
|||
SerializeCommon(deserialize);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ public:
|
|||
UpdateMessageSubscriptions();
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ public:
|
|||
Init(paramNode);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override;
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override;
|
||||
|
||||
void SetSelectionHighlight(const CColor& color, bool selected) override
|
||||
{
|
||||
|
|
@ -354,7 +354,7 @@ private:
|
|||
const float CCmpSelectable::FADE_DURATION = 0.3f;
|
||||
const char* CCmpSelectable::TEXTUREBASEPATH = "art/textures/selection/";
|
||||
|
||||
void CCmpSelectable::HandleMessage(const CMessage& msg, bool UNUSED(global))
|
||||
void CCmpSelectable::HandleMessage(const CMessage& msg, bool /*global*/)
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public:
|
|||
m_LatestTemplates[id] = mapEl.first;
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ public:
|
|||
deserialize.Bool("trigger event", m_TriggerEvent);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
@ -705,7 +705,7 @@ void CCmpTerritoryManager::UpdateBoundaryLines()
|
|||
}
|
||||
}
|
||||
|
||||
void CCmpTerritoryManager::Interpolate(float frameTime, float UNUSED(frameOffset))
|
||||
void CCmpTerritoryManager::Interpolate(float frameTime, float /*frameOffset*/)
|
||||
{
|
||||
m_AnimTime += frameTime;
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public:
|
|||
return m_x;
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
@ -133,7 +133,7 @@ public:
|
|||
return m_x;
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
@ -194,7 +194,7 @@ public:
|
|||
return m_x;
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -370,7 +370,7 @@ public:
|
|||
m_BlockMovement = cmpObstruction->GetBlockMovementFlag(false);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2022 Wildfire Games.
|
||||
/* Copyright (C) 2025 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
|
|
@ -130,7 +130,7 @@ void CCmpUnitMotionManager::ClassInit(CComponentManager& componentManager)
|
|||
#endif
|
||||
}
|
||||
|
||||
void CCmpUnitMotionManager::HandleMessage(const CMessage& msg, bool UNUSED(global))
|
||||
void CCmpUnitMotionManager::HandleMessage(const CMessage& msg, bool /*global*/)
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
@ -276,7 +276,8 @@ template<>
|
|||
struct SerializeHelper<CCmpUnitMotionManager::MotionState>
|
||||
{
|
||||
template<typename S>
|
||||
void operator()(S& serialize, const char* UNUSED(name), Serialize::qualify<S, CCmpUnitMotionManager::MotionState> value)
|
||||
void operator()(S& serialize, const char* /*name*/,
|
||||
Serialize::qualify<S, CCmpUnitMotionManager::MotionState> value)
|
||||
{
|
||||
Serializer(serialize, "pushing pressure", value.pushingPressure);
|
||||
}
|
||||
|
|
@ -285,7 +286,8 @@ struct SerializeHelper<CCmpUnitMotionManager::MotionState>
|
|||
template<>
|
||||
struct SerializeHelper<EntityMap<CCmpUnitMotionManager::MotionState>>
|
||||
{
|
||||
void operator()(ISerializer& serialize, const char* UNUSED(name), EntityMap<CCmpUnitMotionManager::MotionState>& value)
|
||||
void operator()(ISerializer& serialize, const char* /*name*/,
|
||||
EntityMap<CCmpUnitMotionManager::MotionState>& value)
|
||||
{
|
||||
// Serialize manually, we don't have a default-constructor for deserialization.
|
||||
Serializer(serialize, "size", static_cast<u32>(value.size()));
|
||||
|
|
@ -296,7 +298,8 @@ struct SerializeHelper<EntityMap<CCmpUnitMotionManager::MotionState>>
|
|||
}
|
||||
}
|
||||
|
||||
void operator()(IDeserializer& deserialize, const char* UNUSED(name), EntityMap<CCmpUnitMotionManager::MotionState>& value)
|
||||
void operator()(IDeserializer& deserialize, const char* /*name*/,
|
||||
EntityMap<CCmpUnitMotionManager::MotionState>& value)
|
||||
{
|
||||
u32 units = 0;
|
||||
Serializer(deserialize, "size", units);
|
||||
|
|
@ -778,7 +781,7 @@ void CCmpUnitMotionManager::Push(EntityMap<MotionState>::value_type& a, EntityMa
|
|||
}
|
||||
|
||||
#if DEBUG_RENDER
|
||||
void RenderDebugOverlay(SceneCollector& collector, const CFrustum& frustum, bool UNUSED(culling))
|
||||
void RenderDebugOverlay(SceneCollector& collector, const CFrustum& frustum, bool /*culling*/)
|
||||
{
|
||||
for (SOverlaySphere& sph: debugDataMotionMgr.m_Spheres)
|
||||
if (frustum.IsSphereVisible(sph.m_Center, sph.m_Radius))
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ public:
|
|||
Init(paramNode);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public:
|
|||
Init(paramNode);
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ public:
|
|||
RecomputeWaterData();
|
||||
}
|
||||
|
||||
void HandleMessage(const CMessage& msg, bool UNUSED(global)) override
|
||||
void HandleMessage(const CMessage& msg, bool /*global*/) override
|
||||
{
|
||||
switch (msg.GetType())
|
||||
{
|
||||
|
|
@ -126,12 +126,12 @@ public:
|
|||
GetSimContext().GetComponentManager().BroadcastMessage(msg);
|
||||
}
|
||||
|
||||
entity_pos_t GetWaterLevel(entity_pos_t UNUSED(x), entity_pos_t UNUSED(z)) const override
|
||||
entity_pos_t GetWaterLevel(entity_pos_t /*x*/, entity_pos_t /*z*/) const override
|
||||
{
|
||||
return m_WaterHeight;
|
||||
}
|
||||
|
||||
float GetExactWaterLevel(float UNUSED(x), float UNUSED(z)) const override
|
||||
float GetExactWaterLevel(float /*x*/, float /*z*/) const override
|
||||
{
|
||||
return m_WaterHeight.ToFloat();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ public:
|
|||
class NullObstructionFilter : public IObstructionTestFilter
|
||||
{
|
||||
public:
|
||||
virtual bool TestShape(tag_t, flags_t, entity_id_t UNUSED(group), entity_id_t UNUSED(group2)) const
|
||||
virtual bool TestShape(tag_t, flags_t /*flags*/, entity_id_t /*group*/, entity_id_t /*group2*/) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -389,7 +389,7 @@ public:
|
|||
class StationaryOnlyObstructionFilter : public IObstructionTestFilter
|
||||
{
|
||||
public:
|
||||
virtual bool TestShape(tag_t, flags_t flags, entity_id_t UNUSED(group), entity_id_t UNUSED(group2)) const
|
||||
virtual bool TestShape(tag_t, flags_t flags, entity_id_t /*group*/, entity_id_t /*group2*/) const
|
||||
{
|
||||
return !(flags & ICmpObstructionManager::FLAG_MOVING);
|
||||
}
|
||||
|
|
@ -531,7 +531,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual bool TestShape(tag_t tag, flags_t, entity_id_t UNUSED(group), entity_id_t UNUSED(group2)) const
|
||||
virtual bool TestShape(tag_t tag, flags_t, entity_id_t /*group*/, entity_id_t /*group2*/) const
|
||||
{
|
||||
return tag.n != m_Tag.n;
|
||||
}
|
||||
|
|
@ -584,7 +584,7 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual bool TestShape(tag_t tag, flags_t flags, entity_id_t UNUSED(group), entity_id_t UNUSED(group2)) const
|
||||
virtual bool TestShape(tag_t tag, flags_t flags, entity_id_t /*group*/, entity_id_t /*group2*/) const
|
||||
{
|
||||
return (tag.n != m_Tag.n && (flags & m_Mask) != 0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,29 +30,29 @@ public:
|
|||
|
||||
ICmpObstructionManager::tag_t GetObstruction() const override { return ICmpObstructionManager::tag_t(); }
|
||||
bool GetObstructionSquare(ICmpObstructionManager::ObstructionSquare& out) const override { out = obstruction; return true; }
|
||||
bool GetPreviousObstructionSquare(ICmpObstructionManager::ObstructionSquare& UNUSED(out)) const override { return true; }
|
||||
bool GetPreviousObstructionSquare(ICmpObstructionManager::ObstructionSquare& /*out*/) const override { return true; }
|
||||
entity_pos_t GetSize() const override { return entity_pos_t::Zero(); }
|
||||
CFixedVector2D GetStaticSize() const override { return CFixedVector2D(); }
|
||||
EObstructionType GetObstructionType() const override { return ICmpObstruction::STATIC; }
|
||||
void SetUnitClearance(const entity_pos_t& UNUSED(clearance)) override { }
|
||||
void SetUnitClearance(const entity_pos_t& /*clearance*/) override { }
|
||||
bool IsControlPersistent() const override { return true; }
|
||||
bool CheckShorePlacement() const override { return true; }
|
||||
EFoundationCheck CheckFoundation(const std::string& UNUSED(className)) const override { return EFoundationCheck(); }
|
||||
EFoundationCheck CheckFoundation(const std::string& UNUSED(className), bool UNUSED(onlyCenterPoint)) const override { return EFoundationCheck(); }
|
||||
std::string CheckFoundation_wrapper(const std::string& UNUSED(className), bool UNUSED(onlyCenterPoint)) const override { return std::string(); }
|
||||
EFoundationCheck CheckFoundation(const std::string& /*className*/) const override { return EFoundationCheck(); }
|
||||
EFoundationCheck CheckFoundation(const std::string& /*className*/, bool /*onlyCenterPoint*/) const override { return EFoundationCheck(); }
|
||||
std::string CheckFoundation_wrapper(const std::string& /*className*/, bool /*onlyCenterPoint*/) const override { return std::string(); }
|
||||
bool CheckDuplicateFoundation() const override { return true; }
|
||||
std::vector<entity_id_t> GetEntitiesByFlags(ICmpObstructionManager::flags_t) const override { return std::vector<entity_id_t>(); }
|
||||
std::vector<entity_id_t> GetEntitiesBlockingMovement() const override { return std::vector<entity_id_t>(); }
|
||||
std::vector<entity_id_t> GetEntitiesBlockingConstruction() const override { return std::vector<entity_id_t>(); }
|
||||
std::vector<entity_id_t> GetEntitiesDeletedUponConstruction() const override { return std::vector<entity_id_t>(); }
|
||||
void ResolveFoundationCollisions() const override { }
|
||||
void SetActive(bool UNUSED(active)) override { }
|
||||
void SetMovingFlag(bool UNUSED(enabled)) override { }
|
||||
void SetDisableBlockMovementPathfinding(bool UNUSED(movementDisabled), bool UNUSED(pathfindingDisabled), int32_t UNUSED(shape)) override { }
|
||||
void SetActive(bool /*active*/) override { }
|
||||
void SetMovingFlag(bool /*enabled*/) override { }
|
||||
void SetDisableBlockMovementPathfinding(bool /*movementDisabled*/, bool /*pathfindingDisabled*/, int32_t /*shape*/) override { }
|
||||
bool GetBlockMovementFlag(bool) const override { return true; }
|
||||
void SetControlGroup(entity_id_t UNUSED(group)) override { }
|
||||
void SetControlGroup(entity_id_t /*group*/) override { }
|
||||
entity_id_t GetControlGroup() const override { return INVALID_ENTITY; }
|
||||
void SetControlGroup2(entity_id_t UNUSED(group2)) override { }
|
||||
void SetControlGroup2(entity_id_t /*group2*/) override { }
|
||||
entity_id_t GetControlGroup2() const override { return INVALID_ENTITY; }
|
||||
};
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue