Allan Odgaard
69c83e56df
The ‘const’ keyword should be to the right of its type
...
The standard doesn’t care which side the keyword is placed on, but placing it on the right makes it easier to read types.
E.g. reading “int const* const” from right to left we get “const pointer to const integer”.
2014-03-31 08:27:19 +07:00
Allan Odgaard
db13d4c1f9
Use std::string::back() instead of operator[] with size()-1
2014-03-31 08:27:18 +07:00
Allan Odgaard
dac27f7587
Use constants for input, output, and error file descriptors
2014-03-29 09:57:09 +07:00
Allan Odgaard
d7660bd89e
Detect first loop iteration using std::exchange “idiom”
2014-03-23 22:47:15 +07:00
Allan Odgaard
eea07b93a7
Move “Open Target” out of the Avian bundle
...
Instead it’s in the OakDebug bundle. This command is only useful for people working on the TextMate source (in TextMate).
2014-03-13 17:25:29 +07:00
Allan Odgaard
c2397484b8
Use C++11 for loop
...
Majority of the edits done using the following ruby script:
def update_loops(src)
dst, cnt = '', 0
block_indent, variable = nil, nil
src.each_line do |line|
if block_indent
if line =~ /^#{block_indent}([{}\t])|^\t*$/
block_indent = nil if $1 == '}'
line = line.gsub(%r{ ([^a-z>]) \(\*#{variable}\) | \*#{variable}\b | \b#{variable}(->) }x) do
$1.to_s + variable + ($2 == "->" ? "." : "")
end
else
block_indent = nil
end
elsif line =~ /^(\t*)c?iterate\((\w+), (?!diacritics::make_range)(.*\))$/
block_indent, variable = $1, $2
line = "#$1for(auto const& #$2 : #$3\n"
cnt += 1
end
dst << line
end
return dst, cnt
end
paths.each do |path|
src = IO.read(path)
cnt = 1
while cnt != 0
src, cnt = update_loops(src)
STDERR << "#{path}: #{cnt}\n"
end
File.open(path, "w") { |io| io << src }
end
2014-03-03 10:34:13 +07:00
Allan Odgaard
a8c269e75c
Call ‘atos’ via xcrun
2014-02-18 23:09:53 +07:00
Allan Odgaard
f346f2e717
Ensure delegate is retained
2013-09-05 23:57:02 +02:00
Allan Odgaard
455ecafdb5
Make debug logging thread safe
2013-02-22 15:50:37 +01:00
Allan Odgaard
407737259a
Avoid compiler security warning about format strings
...
The warning is about using ‘%n’ in format strings [-Wformat-security]
2013-01-12 13:09:16 +01:00
Allan Odgaard
53d0a03484
ARC: Update OakDebug framework
2012-12-24 16:32:01 +01:00
Allan Odgaard
71be61cbbb
Enable ARC by default
...
We now explicitly disable it for targets that hasn’t yet been upgraded to ARC. This way, it’s easier to get an overview of which targets hasn’t yet been upgraded and ensures new targets has ARC enabled.
2012-12-19 19:42:36 +01:00
Allan Odgaard
983bce86aa
Use @autoreleasepool blocks
2012-09-25 12:30:12 +02:00
Allan Odgaard
a3cae448b1
fixup! Use Objective-C for…in instead of macro
2012-09-21 16:23:35 +02:00
Allan Odgaard
8fd7b82cbd
Remove CocoaSTL.h include
2012-09-20 12:22:20 +02:00
Allan Odgaard
0e96a04d76
Remove compatibility checks
...
Since we now require 10.7 we don’t need all of this. Keeping it around is just noise that can lead to confusion about code paths.
2012-08-29 16:02:29 +02:00
Jacob Bandes-Storch
c5520a6919
Use libc++: replace typeof with decltype
2012-08-28 13:30:21 +02:00
Jacob Bandes-Storch
e3aa997b06
Use libc++: replace std::tr1 with std
2012-08-28 13:30:20 +02:00
Allan Odgaard
9894969e67
Initial commit
2012-08-09 16:25:56 +02:00