This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int Coalesce(int a, int b) | |
{ | |
return a != 0 ? a : b; | |
} | |
bool CheckStatus(int status) | |
{ | |
if (status != 0) | |
{ | |
status = -status; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
01-28 11:30:05.435 24444 24485 I Unity : SystemInfo CPU = ARMv7 VFPv3 NEON, Cores = 4, Memory = 5737mb | |
01-28 11:30:05.435 24444 24485 I Unity : SystemInfo ARM big.LITTLE configuration: 2 big (mask: 0xc), 2 little (mask: 0x3) | |
01-28 11:30:05.439 24444 24485 I Unity : ApplicationInfo com.motoriousentertainment.raceteam version 1.3.0 build 684d60ef-6c10-47d0-83ae-d85050097194 | |
01-28 11:30:05.439 24444 24485 I Unity : Built from '2018.3/staging' branch, Version '2018.3.2f1 (b3c100a4b73a)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a' | |
01-28 11:30:05.441 2719 23494 I Icing : IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=AppsCorpus serviceId=32 | |
01-28 11:30:05.442 2719 3150 I Icing : IndexChimeraService.getServiceInterface callingPackage=com.google.android.gms componentName=AppsCorpus serviceId=36 | |
01-28 11:30:05.466 24444 24475 E GraphResponse: {HttpStatus: 400, errorCode: 104, subErrorCode: -1, errorType: OAuthException, errorMessage: An |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) bt | |
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 | |
#1 0x00007ffff2a922f1 in __GI_abort () at abort.c:79 | |
#2 0x00007ffff2cbe943 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
#3 0x00007ffff2cc4896 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
#4 0x00007ffff2cc48d1 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
#5 0x00007ffff2cc4b04 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
#6 0x00007ffff2cc082b in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | |
#7 0x00000000004a41fb in std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, chatroom_log, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, chatroom_log> > >::at ( | |
this=0x1886c68 <default_chat_log[abi:cxx11]>, __k=...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function split_to_array(s) | |
local a = {} | |
for m in utils.split(s) do table.insert(a, m) end | |
return a | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5d8b4f7987c8fca0e042021a61ce5c8086da3544 Mon Sep 17 00:00:00 2001 | |
From: Jyrki Vesterinen <[email protected]> | |
Date: Sat, 7 Jul 2018 09:50:49 +0300 | |
Subject: [PATCH] Experimental fixes for the crash when a modeless dialog | |
destroys itself | |
This commit fixes the crashes, but I'm not convinced that one of the fixes | |
is correct. | |
Setting `handled` and `halt` to true in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function ordered_map_of_keys(t) | |
local ordered_map = {} | |
for k, v in pairs(t) | |
table.insert(ordered_map, k) | |
end | |
table.sort(ordered_map) | |
return ordered_map | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function good(t) | |
table.sort(t) -- OK, does what you expect | |
end | |
local function bad(table) | |
table.sort(table) -- error, the table doesn't have a field called "sort" | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local weather_names = {"clear", "snowfall"} | |
local weather_probabilities = {5, 1} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function weighted_random(odds) | |
local target = wesnoth.random() | |
local sum = 0.0 | |
local i = 1 | |
sum += odds[1] | |
while sum <= target and i <= #odds do | |
sum += odds[i] | |
i += 1 | |
end | |
return i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local weathers = {"clear", "drought", "rain", "snowfall"} | |
local roll = wesnoth.random(4) | |
weather_id = weathers[roll] |
NewerOlder