1. 19 Mar, 2014 1 commit
  2. 17 Mar, 2014 1 commit
  3. 14 Mar, 2014 2 commits
  4. 12 Mar, 2014 2 commits
  5. 08 Jan, 2014 2 commits
  6. 06 Jan, 2014 1 commit
  7. 16 Dec, 2013 1 commit
  8. 10 Oct, 2013 1 commit
  9. 02 Oct, 2013 1 commit
  10. 01 Oct, 2013 2 commits
  11. 30 Sep, 2013 1 commit
  12. 17 Jul, 2013 1 commit
  13. 16 Jul, 2013 2 commits
  14. 08 Jul, 2013 1 commit
  15. 30 May, 2013 1 commit
  16. 29 May, 2013 2 commits
  17. 30 Apr, 2013 1 commit
  18. 06 Mar, 2013 2 commits
  19. 14 Feb, 2013 1 commit
  20. 06 Feb, 2013 1 commit
  21. 05 Feb, 2013 1 commit
  22. 29 Jan, 2013 1 commit
  23. 14 Jan, 2013 1 commit
  24. 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
  25. 28 Nov, 2012 1 commit
  26. 21 Nov, 2012 1 commit
  27. 20 Nov, 2012 1 commit
  28. 11 Oct, 2012 1 commit
  29. 05 Oct, 2012 1 commit
  30. 01 Oct, 2012 1 commit
  31. 27 Sep, 2012 1 commit
  32. 26 Sep, 2012 1 commit
  33. 25 Sep, 2012 1 commit