1. 22 Mar, 2013 3 commits
  2. 11 Mar, 2013 1 commit
  3. 08 Mar, 2013 1 commit
  4. 06 Mar, 2013 1 commit
  5. 27 Feb, 2013 1 commit
  6. 26 Feb, 2013 2 commits
  7. 16 Feb, 2013 1 commit
  8. 07 Feb, 2013 1 commit
  9. 01 Feb, 2013 1 commit
  10. 31 Jan, 2013 1 commit
  11. 29 Jan, 2013 1 commit
  12. 25 Jan, 2013 1 commit
  13. 24 Jan, 2013 1 commit
  14. 17 Jan, 2013 2 commits
  15. 10 Jan, 2013 1 commit
  16. 09 Jan, 2013 2 commits
  17. 08 Jan, 2013 1 commit
    • Orgad Shaneh's avatar
      Remove braces for single lines of conditions · 29a93998
      Orgad Shaneh authored
      
      
      #!/usr/bin/env ruby
      
      Dir.glob('**/*.cpp') { |file|
        # skip ast (excluding paste, astpath, and canv'ast'imer)
        next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
        s = File.read(file)
        next if s.include?('qlalr')
        orig = s.dup
        s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
          res = $&
          if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
            res
          else
            res.gsub!('} else', 'else')
            res.gsub!(/\n +} *\n/m, "\n")
            res.gsub(/ *{$/, '')
          end
        }
        s.gsub!(/ *$/, '')
        File.open(file, 'wb').write(s) if s != orig
      }
      
      Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
      Reviewed-by: default avatarhjk <qthjk@ovi.com>
      29a93998
  18. 29 Dec, 2012 3 commits
  19. 20 Dec, 2012 1 commit
  20. 17 Nov, 2012 1 commit
  21. 16 Nov, 2012 1 commit
  22. 09 Nov, 2012 4 commits
  23. 05 Nov, 2012 1 commit
  24. 02 Nov, 2012 2 commits
  25. 24 Oct, 2012 1 commit
  26. 23 Oct, 2012 1 commit
  27. 16 Oct, 2012 1 commit
  28. 05 Oct, 2012 1 commit
  29. 01 Oct, 2012 1 commit