Skip to content

Commit ff08748

Browse files
committed
Ensure all files have trailing new-lines and enforce with clang warning
1 parent fde74d4 commit ff08748

File tree

158 files changed

+161
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+161
-157
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
327327
endif()
328328
endif()
329329

330+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
331+
list(APPEND warning_flags -Wnewline-eof)
332+
endif()
333+
330334
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0 AND NOT APPLE)
331335
list(APPEND warning_flags -Wno-unused-lambda-capture)
332336
endif()

qrenderdoc/Code/Interface/Analytics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,4 +318,4 @@ void DocumentReport();
318318

319319
#endif
320320

321-
#endif
321+
#endif

qrenderdoc/Code/Interface/RemoteHost.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ Returns the name to display for this host in the UI, either :meth:`FriendlyName`
132132
void UpdateStatus(ReplayStatus status);
133133
};
134134

135-
DECLARE_REFLECTION_STRUCT(RemoteHost);
135+
DECLARE_REFLECTION_STRUCT(RemoteHost);

qrenderdoc/Code/QRDUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -655,4 +655,4 @@ bool IsDarkTheme();
655655
float getLuminance(const QColor &col);
656656
QColor contrastingColor(const QColor &col, const QColor &defaultCol);
657657

658-
void *AccessWaylandPlatformInterface(const QByteArray &resource, QWindow *window);
658+
void *AccessWaylandPlatformInterface(const QByteArray &resource, QWindow *window);

qrenderdoc/Code/RGPInterop.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@ class RGPInterop : public IRGPInterop
141141
QString EncodeCommand(RGPCommand command, QVariantList params);
142142
bool DecodeCommand(QString command);
143143
void ProcessReadBuffer();
144-
};
144+
};

qrenderdoc/Code/Resources.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,4 +149,4 @@ struct Icons
149149
#define RESOURCE_DEF(name, filename) \
150150
static const QIcon &name() { return Resources::name().icon; }
151151
RESOURCE_LIST()
152-
};
152+
};

qrenderdoc/Code/precompiled.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
* THE SOFTWARE.
2323
******************************************************************************/
2424

25-
#include "precompiled.h"
25+
#include "precompiled.h"

qrenderdoc/Code/pyrenderdoc/PythonContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,4 +1271,4 @@ extern "C" QWidget *QWidgetFromPy(PyObject *widget)
12711271
extern "C" PyObject *QWidgetToPy(QWidget *widget)
12721272
{
12731273
return PythonContext::QWidgetToPy(widget);
1274-
}
1274+
}

qrenderdoc/Code/pyrenderdoc/PythonContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,4 +181,4 @@ struct PythonContextHandle
181181
PythonContext &ctx() { return *m_ctx; }
182182
private:
183183
PythonContext *m_ctx;
184-
};
184+
};

qrenderdoc/Code/pyrenderdoc/container_handling.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,4 +688,4 @@ int array_setsubscript(arrayType *thisptr, PyObject *idxobj, PyObject *val)
688688
SWIG_exception_fail(SWIG_TypeError, "list index not index or slice");
689689
fail:
690690
return -1;
691-
}
691+
}

qrenderdoc/Code/pyrenderdoc/pyrenderdoc_stub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ extern "C" void SetThreadBlocking(PyObject *global_handle, bool block)
6464
{
6565
}
6666

67-
REPLAY_PROGRAM_MARKER()
67+
REPLAY_PROGRAM_MARKER()

qrenderdoc/Code/pyrenderdoc/qrenderdoc_stub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,4 @@ void RemoteHost::SetConnected(bool connected)
255255

256256
void RemoteHost::SetShutdown()
257257
{
258-
}
258+
}

qrenderdoc/Styles/StyleData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ const ThemeDescriptor availStyles[] = {
5151
};
5252

5353
const int numAvailable = sizeof(availStyles) / sizeof(ThemeDescriptor);
54-
};
54+
};

qrenderdoc/Styles/StyleData.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ struct ThemeDescriptor
4545

4646
extern const ThemeDescriptor availStyles[];
4747
extern const int numAvailable;
48-
};
48+
};

qrenderdoc/Widgets/CustomPaintWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ bool CustomPaintWidget::event(QEvent *e)
123123
paintEvent(NULL);
124124
return QWidget::event(e);
125125
}
126-
#endif
126+
#endif

qrenderdoc/Widgets/Extended/RDHeaderView.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ inline int RDHeaderView::logicalIndexAt(int ax, int ay) const
132132
inline int RDHeaderView::logicalIndexAt(const QPoint &apos) const
133133
{
134134
return logicalIndexAt(apos.x(), apos.y());
135-
}
135+
}

qrenderdoc/Widgets/Extended/RDTreeWidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,4 +1082,4 @@ void RDTreeWidget::endInsertChild(RDTreeWidgetItem *item, int index)
10821082
// work is all done in beginInsertChild
10831083
if(!m_queueUpdates)
10841084
m_model->endInsertChild(item);
1085-
}
1085+
}

qrenderdoc/Widgets/FindReplace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,4 @@ void FindReplace::on_findMode_clicked()
192192
void FindReplace::on_replaceMode_clicked()
193193
{
194194
setReplaceMode(true);
195-
}
195+
}

qrenderdoc/Widgets/ResourcePreview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ void ResourcePreview::changeEvent(QEvent *event)
122122
QWidget *ResourcePreview::thumbWidget()
123123
{
124124
return ui->thumbnail;
125-
}
125+
}

qrenderdoc/Widgets/ThumbnailStrip.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,4 +172,4 @@ void ThumbnailStrip::refreshLayout()
172172
c->setSize(QSize(avail.width(), aspectHeight));
173173
}
174174
}
175-
}
175+
}

qrenderdoc/Windows/Dialogs/ExtensionManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,4 +238,4 @@ void ExtensionManager::update_currentItem(RDTreeWidgetItem *item)
238238
ui->alwaysLoad->setChecked(m_Ctx.Config().AlwaysLoad_Extensions.contains(e.package));
239239
}
240240
}
241-
}
241+
}

qrenderdoc/Windows/Dialogs/SettingsDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,4 +980,4 @@ void SettingsDialog::on_UIStyle_currentIndexChanged(int index)
980980
}
981981

982982
m_Ctx.Config().Save();
983-
}
983+
}

qrenderdoc/Windows/Dialogs/UpdateDialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,4 +260,4 @@ void UpdateDialog::on_update_clicked()
260260

261261
});
262262
}
263-
}
263+
}

qrenderdoc/Windows/PipelineState/VulkanPipelineStateViewer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3706,4 +3706,4 @@ void VulkanPipelineStateViewer::on_meshView_clicked()
37063706
if(!m_Ctx.HasMeshPreview())
37073707
m_Ctx.ShowMeshPreview();
37083708
ToolWindowManager::raiseToolWindow(m_Ctx.GetMeshPreview()->Widget());
3709-
}
3709+
}

qrenderdoc/Windows/StatisticsViewer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,4 +842,4 @@ void StatisticsViewer::OnCaptureLoaded()
842842
{
843843
GenerateReport();
844844
ui->statistics->setText(m_Report);
845-
}
845+
}

qrenderdoc/renderdocui_stub.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,4 @@ int WINAPI wWinMain(_In_ HINSTANCE hInst, _In_opt_ HINSTANCE hPrevInstance, _In_
8181
delete[] paramsAlloc;
8282

8383
return 0;
84-
}
84+
}

renderdoc/3rdparty/android/android_manifest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,4 +248,4 @@ struct ResXMLTree_cdataExt
248248

249249
// The typed value of the character data if this is a CDATA node.
250250
struct Res_value typedData;
251-
};
251+
};

renderdoc/3rdparty/catch/catch.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ struct StringMaker<rdcstr>
4646
{
4747
static std::string convert(rdcstr const &value) { return value; }
4848
};
49-
}
49+
}

renderdoc/3rdparty/jpeg-compressor/jpgd.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3172,4 +3172,4 @@ unsigned char *decompress_jpeg_image_from_file(const char *pSrc_filename, int *w
31723172
return decompress_jpeg_image_from_stream(&file_stream, width, height, actual_comps, req_comps);
31733173
}
31743174

3175-
} // namespace jpgd
3175+
} // namespace jpgd

renderdoc/android/android.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,4 +1168,4 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const char *a, const char *w
11681168

11691169
AndroidController AndroidController::m_Inst;
11701170

1171-
DeviceProtocolRegistration androidProtocol("adb", &AndroidController::Get);
1171+
DeviceProtocolRegistration androidProtocol("adb", &AndroidController::Get);

renderdoc/android/android_manifest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,4 +635,4 @@ bool PatchManifest(std::vector<byte> &manifestBytes)
635635

636636
return true;
637637
}
638-
};
638+
};

renderdoc/android/android_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@ std::string GetPathForPackage(const std::string &deviceID, const std::string &pa
7272
bool PatchManifest(std::vector<byte> &manifest);
7373
};
7474

75-
DECLARE_REFLECTION_ENUM(Android::ABI);
75+
DECLARE_REFLECTION_ENUM(Android::ABI);

renderdoc/android/jdwp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,4 +568,4 @@ class Connection
568568
std::string GetSignature(referenceTypeID typeID);
569569
std::vector<Method> GetMethods(referenceTypeID searchClass);
570570
};
571-
};
571+
};

renderdoc/android/jdwp_connection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,4 +616,4 @@ std::vector<Method> Connection::GetMethods(referenceTypeID searchClass)
616616
data.Done();
617617
return ret;
618618
}
619-
};
619+
};

renderdoc/android/jdwp_util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,4 +306,4 @@ CommandData &CommandData::Write(const frameID &id)
306306
WriteBytes(&tmp, frameID::getSize());
307307
return *this;
308308
}
309-
};
309+
};

renderdoc/api/replay/common_pipestate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,4 +426,4 @@ no VB bound.
426426
bool used;
427427
};
428428

429-
DECLARE_REFLECTION_STRUCT(VertexInputAttribute);
429+
DECLARE_REFLECTION_STRUCT(VertexInputAttribute);

renderdoc/api/replay/pipestate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,4 +341,4 @@ For some APIs that don't distinguish by entry point, this may be empty.
341341
const D3D12Pipe::Shader &GetD3D12Stage(ShaderStage stage) const;
342342
const GLPipe::Shader &GetGLStage(ShaderStage stage) const;
343343
const VKPipe::Shader &GetVulkanStage(ShaderStage stage) const;
344-
};
344+
};

renderdoc/api/replay/rdcstr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,4 +778,4 @@ inline rdcstr operator+(const QChar &left, const rdcstr &right)
778778
{
779779
return rdcstr(left) += right;
780780
}
781-
#endif
781+
#endif

renderdoc/api/replay/renderdoc_tostr.inl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1119,4 +1119,4 @@ rdcstr DoStringise(const ShaderStageMask &el)
11191119
STRINGISE_BITFIELD_CLASS_BIT(Compute);
11201120
}
11211121
END_BITFIELD_STRINGISE();
1122-
}
1122+
}

renderdoc/common/globalconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,4 +219,4 @@ enum
219219
// otherwise, enable them in development builds
220220
#define ENABLE_UNIT_TESTS RDOC_DEVEL
221221

222-
#endif
222+
#endif

renderdoc/common/threading_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,4 @@ TEST_CASE("Test spin lock", "[threading]")
7171
CHECK(finalValue == value);
7272
}
7373

74-
#endif // ENABLED(ENABLE_UNIT_TESTS)
74+
#endif // ENABLED(ENABLE_UNIT_TESTS)

renderdoc/core/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,4 +767,4 @@ struct DeviceProtocolRegistration
767767
{
768768
RenderDoc::Inst().RegisterDeviceProtocol(protocol, handler);
769769
}
770-
};
770+
};

renderdoc/core/intervals_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,4 +440,4 @@ TEST_CASE("Test Intervals type", "[intervals]")
440440
};
441441
};
442442

443-
#endif // ENABLED(ENABLE_UNIT_TESTS)
443+
#endif // ENABLED(ENABLE_UNIT_TESTS)

renderdoc/core/plugins.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ std::string LocatePluginFile(const std::string &path, const std::string &fileNam
8585
ret = fileName;
8686

8787
return ret;
88-
}
88+
}

renderdoc/core/plugins.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424

2525
#include <string>
2626

27-
std::string LocatePluginFile(const std::string &path, const std::string &fileName);
27+
std::string LocatePluginFile(const std::string &path, const std::string &fileName);

renderdoc/core/precompiled.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
* THE SOFTWARE.
2323
******************************************************************************/
2424

25-
#include "precompiled.h"
25+
#include "precompiled.h"

renderdoc/core/precompiled.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626

2727
#include "api/app/renderdoc_app.h"
2828
#include "api/replay/renderdoc_replay.h"
29-
#include "common/common.h"
29+
#include "common/common.h"

renderdoc/data/glsl/glsl_globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,4 +173,4 @@ vec3 CalcCubeCoord(vec2 uv, int face)
173173
#define MESH_TRIANGLE_STRIP 2u
174174
#define MESH_TRIANGLE_FAN 3u
175175
#define MESH_TRIANGLE_LIST_ADJ 4u
176-
#define MESH_TRIANGLE_STRIP_ADJ 5u
176+
#define MESH_TRIANGLE_STRIP_ADJ 5u

renderdoc/data/glsl/glsl_ubos_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
#error Only one of VULKAN and OPENGL must be defined in glsl_ubos.h
5151
#endif
5252

53-
#include "glsl_ubos.h"
53+
#include "glsl_ubos.h"

renderdoc/data/glsl_shaders.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1853,4 +1853,4 @@ void main() {
18531853
};
18541854
}
18551855

1856-
#endif
1856+
#endif

renderdoc/data/glsl_shaders.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ enum class ShaderStage : uint32_t;
4444
using ReflectionMaker =
4545
std::function<void(ShaderStage stage, const std::string &source, const std::string &entryPoint,
4646
ShaderReflection &refl, ShaderBindpointMapping &mapping)>;
47-
void TestGLSLReflection(ShaderType testType, ReflectionMaker compile);
47+
void TestGLSLReflection(ShaderType testType, ReflectionMaker compile);

renderdoc/data/hlsl/hlsl_cbuffers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,4 +217,4 @@ cbuffer HistogramCBufferData REG(b0)
217217
#define MESH_TRIANGLE_LIST 1
218218
#define MESH_TRIANGLE_STRIP 2
219219
#define MESH_TRIANGLE_LIST_ADJ 3
220-
#define MESH_TRIANGLE_STRIP_ADJ 4
220+
#define MESH_TRIANGLE_STRIP_ADJ 4

renderdoc/driver/d3d11/d3d11_context1_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2353,4 +2353,4 @@ TEST_CASE("Check UpdateSubresource data length calculations", "[d3d]")
23532353
}
23542354
}
23552355

2356-
#endif
2356+
#endif

renderdoc/driver/d3d11/d3d11_context3_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ HRESULT WrappedID3D11DeviceContext::Wait(ID3D11Fence *pFence, UINT64 Value)
7070
return E_NOINTERFACE;
7171

7272
return m_pRealContext4->Wait(UNWRAP(WrappedID3D11Fence, pFence), Value);
73-
}
73+
}

renderdoc/driver/d3d11/d3d11_device1_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,4 +370,4 @@ HRESULT WrappedID3D11Device::OpenSharedResourceByName(LPCWSTR lpName, DWORD dwDe
370370
template bool WrappedID3D11Device::CONCAT(Serialise_, func(ReadSerialiser &ser, __VA_ARGS__)); \
371371
template bool WrappedID3D11Device::CONCAT(Serialise_, func(WriteSerialiser &ser, __VA_ARGS__));
372372

373-
SERIALISED_ID3D11DEVICE1_FUNCTIONS();
373+
SERIALISED_ID3D11DEVICE1_FUNCTIONS();

renderdoc/driver/d3d11/d3d11_device3_wrap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,4 +1083,4 @@ HRESULT WrappedID3D11Device::OpenSharedFence(HANDLE hFence, REFIID riid, void **
10831083
template bool WrappedID3D11Device::CONCAT(Serialise_, func(ReadSerialiser &ser, __VA_ARGS__)); \
10841084
template bool WrappedID3D11Device::CONCAT(Serialise_, func(WriteSerialiser &ser, __VA_ARGS__));
10851085

1086-
SERIALISED_ID3D11DEVICE3_FUNCTIONS();
1086+
SERIALISED_ID3D11DEVICE3_FUNCTIONS();

0 commit comments

Comments
 (0)