IndentCaseLabels: false
AccessModifierOffset: -8
ColumnLimit: 90
-AllowShortFunctionsOnASingleLine: Inline
+AllowShortFunctionsOnASingleLine: InlineOnly
SortIncludes: false
IncludeCategories:
- Regex: '^".*'
Priority: 1
AlignAfterOpenBracket: DontAlign
ContinuationIndentWidth: 16
+ConstructorInitializerIndentWidth: 16
+BreakConstructorInitializers: AfterColon
sources: &sources
- llvm-toolchain-trusty-3.6
- - env: PLATFORM=Unix COMPILER=clang-4.0
+ - env: PLATFORM=Unix COMPILER=clang-5.0
compiler: clang
os: linux
addons:
apt:
- packages: ['clang-4.0', 'clang++-4.0']
+ packages: ['clang-5.0', 'clang++-5.0']
sources: &sources
- - llvm-toolchain-trusty-4.0
+ - llvm-toolchain-trusty-5.0
- - env: PLATFORM=Unix COMPILER=clang-4.0 VALGRIND=1
+ - env: PLATFORM=Unix COMPILER=clang-5.0 VALGRIND=1
compiler: clang
os: linux
addons:
apt:
- packages: ['valgrind', 'clang-4.0', 'clang++-4.0']
+ packages: ['valgrind', 'clang-5.0', 'clang++-5.0']
sources: &sources
- - llvm-toolchain-trusty-4.0
+ - llvm-toolchain-trusty-5.0
- env: LINT=1
compiler: clang
os: linux
addons:
apt:
- packages: ['clang-format-4.0']
+ packages: ['clang-format-5.0']
sources: &sources
- - llvm-toolchain-trusty-4.0
+ - llvm-toolchain-trusty-5.0
ChatMessage(const std::wstring &m = L"") : message(m) {}
ChatMessage(ChatMessageType t, const std::wstring &m, const std::wstring &s = L"",
- std::time_t ts = std::time(0))
- : type(t), message(m), sender(s), timestamp(ts)
+ std::time_t ts = std::time(0)) :
+ type(t),
+ message(m), sender(s), timestamp(ts)
{
}
params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
params.ZBufferBits = 24;
#ifdef __ANDROID__
+ // clang-format off
params.PrivateData = porting::app_global;
- params.OGLES2ShaderPath = std::string(
- porting::path_user + DIR_DELIM + "media" + DIR_DELIM + "Shaders" +
- DIR_DELIM).c_str();
+ params.OGLES2ShaderPath = std::string(porting::path_user + DIR_DELIM + "media" +
+ DIR_DELIM + "Shaders" + DIR_DELIM).c_str();
+ // clang-format on
#endif
m_device = createDeviceEx(params);
const HICON hicon = LoadIcon(GetModuleHandle(NULL),
MAKEINTRESOURCE(130) // The ID of the ICON defined in
// winresource.rc
- );
+ );
if (hicon) {
SendMessage(hWnd, WM_SETICON, ICON_BIG, reinterpret_cast<LPARAM>(hicon));
const char *RenderingEngine::getVideoDriverName(irr::video::E_DRIVER_TYPE type)
{
static const char *driver_ids[] = {
- "null", "software", "burningsvideo", "direct3d8", "direct3d9",
- "opengl", "ogles1", "ogles2",
+ "null",
+ "software",
+ "burningsvideo",
+ "direct3d8",
+ "direct3d9",
+ "opengl",
+ "ogles1",
+ "ogles2",
};
return driver_ids[type];
const char *RenderingEngine::getVideoDriverFriendlyName(irr::video::E_DRIVER_TYPE type)
{
static const char *driver_names[] = {
- "NULL Driver", "Software Renderer", "Burning's Video",
- "Direct3D 8", "Direct3D 9", "OpenGL", "OpenGL ES1", "OpenGL ES2",
+ "NULL Driver",
+ "Software Renderer",
+ "Burning's Video",
+ "Direct3D 8",
+ "Direct3D 9",
+ "OpenGL",
+ "OpenGL ES1",
+ "OpenGL ES2",
};
return driver_names[type];
/*
* Below: values managed by m_time_lock
- */
+ */
// Time of day in milli-hours (0-23999), determines day and night
u32 m_time_of_day;
// Time of day in 0...1
std::atomic<u32> m_day_count;
/*
* Above: values managed by m_time_lock
- */
+ */
/* TODO: Add a callback function so these can be updated when a setting
* changes. At this point in time it doesn't matter (e.g. /set
HTTPFetchResult() = default;
- HTTPFetchResult(const HTTPFetchRequest &fetch_request)
- : caller(fetch_request.caller), request_id(fetch_request.request_id)
+ HTTPFetchResult(const HTTPFetchRequest &fetch_request) :
+ caller(fetch_request.caller), request_id(fetch_request.request_id)
{
}
};
struct PeerChange
{
- PeerChange(PeerChangeType t, session_t _peer_id, bool _timeout)
- : type(t), peer_id(_peer_id), timeout(_timeout)
+ PeerChange(PeerChangeType t, session_t _peer_id, bool _timeout) :
+ type(t), peer_id(_peer_id), timeout(_timeout)
{
}
PeerChange() = delete;
static Profiler main_profiler;
Profiler *g_profiler = &main_profiler;
ScopeProfiler::ScopeProfiler(
- Profiler *profiler, const std::string &name, ScopeProfilerType type)
- : m_profiler(profiler), m_name(name), m_type(type)
+ Profiler *profiler, const std::string &name, ScopeProfilerType type) :
+ m_profiler(profiler),
+ m_name(name), m_type(type)
{
if (m_profiler)
m_timer = new TimeTaker(m_name);
struct SimpleSoundSpec
{
SimpleSoundSpec(const std::string &name = "", float gain = 1.0f,
- float fade = 0.0f, float pitch = 1.0f)
- : name(name), gain(gain), fade(fade), pitch(pitch)
+ float fade = 0.0f, float pitch = 1.0f) :
+ name(name),
+ gain(gain), fade(fade), pitch(pitch)
{
}
ItemPartColor() = default;
- ItemPartColor(bool override, video::SColor color)
- : override_base(override), color(color)
+ ItemPartColor(bool override, video::SColor color) :
+ override_base(override), color(color)
{
}
};
elif [[ "${COMPILER}" == "clang-3.6" ]]; then
export CC=clang-3.6
export CXX=clang++-3.6
- elif [[ "${COMPILER}" == "clang-4.0" ]]; then
- export CC=clang-4.0
- export CXX=clang++-4.0
+ elif [[ "${COMPILER}" == "clang-5.0" ]]; then
+ export CC=clang-5.0
+ export CXX=clang++-5.0
fi
}
needs_compile() {
RANGE="$TRAVIS_COMMIT_RANGE"
- if [[ "$(git diff --name-only $RANGE -- 2>/dev/null)" == "" ]]; then
+ if [[ "$(git diff --name-only $RANGE -- 2>/dev/null)" == "" ]]; then
RANGE="$TRAVIS_COMMIT^...$TRAVIS_COMMIT"
echo "Fixed range: $RANGE"
fi
#! /bin/bash
function perform_lint() {
echo "Performing LINT..."
- if hash clang-format-4.0 2>/dev/null; then
- CLANG_FORMAT=clang-format-4.0
+ if hash clang-format-5.0 2>/dev/null; then
+ CLANG_FORMAT=clang-format-5.0
else
CLANG_FORMAT=clang-format
fi