mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-16 01:08:56 +00:00
![Orgad Shaneh](/assets/img/avatar_default.png)
Mostly done using the following Ruby script: (Dir.glob('**/*.cpp') + Dir.glob('**/*.h')).each do |file| s = File.read(file, encoding: 'iso8859-1') t = s.gsub(/(([\w_.\[\]]+)\s*=\s*new\s+\S+?\[[^\]]+?\](?!\())([^\{\}]*?)\n\s+memset\(\s*\2\s*,\s*0\s*,[^;]*;/m, '\1()\3') if t != s File.open(file, 'w') { |io| io.write(t) } end end