Browse Source

chore: fix linter errors in .mm files (#21934)

Alexey Kuzmin 5 years ago
parent
commit
4da56797c3

+ 2 - 2
script/lint.js

@@ -268,8 +268,8 @@ async function main () {
   const opts = parseCommandLine()
 
   // no mode specified? run 'em all
-  if (!opts['c++'] && !opts.javascript && !opts.python && !opts.gn && !opts.patches) {
-    opts['c++'] = opts.javascript = opts.python = opts.gn = opts.patches = true
+  if (!opts['c++'] && !opts.javascript && !opts.objc && !opts.python && !opts.gn && !opts.patches) {
+    opts['c++'] = opts.javascript = opts.objc = opts.python = opts.gn = opts.patches = true
   }
 
   const linters = LINTERS.filter(x => opts[x.key])

+ 2 - 0
shell/browser/native_window_mac.mm

@@ -7,7 +7,9 @@
 #include <AvailabilityMacros.h>
 #include <objc/objc-runtime.h>
 
+#include <algorithm>
 #include <string>
+#include <utility>
 #include <vector>
 
 #include "base/mac/mac_util.h"

+ 1 - 0
shell/browser/ui/cocoa/atom_bundle_mover.mm

@@ -5,6 +5,7 @@
 #import "shell/browser/ui/cocoa/atom_bundle_mover.h"
 
 #include <string>
+#include <utility>
 
 #import <AppKit/AppKit.h>
 #import <Foundation/Foundation.h>

+ 2 - 0
shell/browser/ui/cocoa/atom_menu_controller.mm

@@ -5,6 +5,8 @@
 
 #import "shell/browser/ui/cocoa/atom_menu_controller.h"
 
+#include <utility>
+
 #include "base/logging.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"

+ 1 - 0
shell/browser/ui/cocoa/atom_touch_bar.mm

@@ -5,6 +5,7 @@
 #import "shell/browser/ui/cocoa/atom_touch_bar.h"
 
 #include <string>
+#include <utility>
 #include <vector>
 
 #include "base/strings/sys_string_conversions.h"