diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-11 19:01:43 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-11 19:01:43 +0000 |
commit | 01c86ece0232e9b15bff05f1ee508c7f6bdc2ef0 (patch) | |
tree | ce78aa58908c7bc64bcb3596bd1298b872b85701 /tools | |
parent | a19317f99fd8f35cd2bf8ebe3d0f34dc71866574 (diff) | |
download | chromium_src-01c86ece0232e9b15bff05f1ee508c7f6bdc2ef0.zip chromium_src-01c86ece0232e9b15bff05f1ee508c7f6bdc2ef0.tar.gz chromium_src-01c86ece0232e9b15bff05f1ee508c7f6bdc2ef0.tar.bz2 |
Remove the rest of #pragma once in one big CL.
For context see this thread:
https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II
TBR=thakis,pkasting,jam
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r-- | tools/android/common/adb_connection.h | 1 | ||||
-rw-r--r-- | tools/android/common/daemon.h | 1 | ||||
-rw-r--r-- | tools/android/common/net.h | 1 | ||||
-rw-r--r-- | tools/json_schema_compiler/any.h | 1 | ||||
-rw-r--r-- | tools/json_schema_compiler/h_generator.py | 1 | ||||
-rw-r--r-- | tools/json_schema_compiler/schema_bundle_generator.py | 1 | ||||
-rw-r--r-- | tools/json_schema_compiler/util.h | 1 | ||||
-rw-r--r-- | tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.h | 1 | ||||
-rwxr-xr-x | tools/pragmaonce/pragmaonce.py | 54 |
9 files changed, 0 insertions, 62 deletions
diff --git a/tools/android/common/adb_connection.h b/tools/android/common/adb_connection.h index 9d59d07..3fa0fb39 100644 --- a/tools/android/common/adb_connection.h +++ b/tools/android/common/adb_connection.h @@ -4,7 +4,6 @@ #ifndef TOOLS_ANDROID_COMMON_ADB_CONNECTION_H_ #define TOOLS_ANDROID_COMMON_ADB_CONNECTION_H_ -#pragma once namespace tools { diff --git a/tools/android/common/daemon.h b/tools/android/common/daemon.h index 063c440..0c16401 100644 --- a/tools/android/common/daemon.h +++ b/tools/android/common/daemon.h @@ -4,7 +4,6 @@ #ifndef TOOLS_ANDROID_COMMON_DAEMON_H_ #define TOOLS_ANDROID_COMMON_DAEMON_H_ -#pragma once class CommandLine; diff --git a/tools/android/common/net.h b/tools/android/common/net.h index 091f362..e361954 100644 --- a/tools/android/common/net.h +++ b/tools/android/common/net.h @@ -4,7 +4,6 @@ #ifndef TOOLS_ANDROID_COMMON_NET_H_ #define TOOLS_ANDROID_COMMON_NET_H_ -#pragma once #include <string> diff --git a/tools/json_schema_compiler/any.h b/tools/json_schema_compiler/any.h index 8169313..9e44048 100644 --- a/tools/json_schema_compiler/any.h +++ b/tools/json_schema_compiler/any.h @@ -4,7 +4,6 @@ #ifndef TOOLS_JSON_SCHEMA_COMPILER_ANY_H__ #define TOOLS_JSON_SCHEMA_COMPILER_ANY_H__ -#pragma once #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" diff --git a/tools/json_schema_compiler/h_generator.py b/tools/json_schema_compiler/h_generator.py index 5e7e700..b5801ef 100644 --- a/tools/json_schema_compiler/h_generator.py +++ b/tools/json_schema_compiler/h_generator.py @@ -32,7 +32,6 @@ class HGenerator(object): self._target_namespace) (c.Append('#ifndef %s' % ifndef_name) .Append('#define %s' % ifndef_name) - .Append('#pragma once') .Append() .Append('#include <string>') .Append('#include <vector>') diff --git a/tools/json_schema_compiler/schema_bundle_generator.py b/tools/json_schema_compiler/schema_bundle_generator.py index 21e453c..08cc4a8 100644 --- a/tools/json_schema_compiler/schema_bundle_generator.py +++ b/tools/json_schema_compiler/schema_bundle_generator.py @@ -35,7 +35,6 @@ class SchemaBundleGenerator(object): c.Append() c.Append('#ifndef %s' % ifndef_name) c.Append('#define %s' % ifndef_name) - c.Append('#pragma once') c.Append() c.Concat(body_code) c.Append() diff --git a/tools/json_schema_compiler/util.h b/tools/json_schema_compiler/util.h index c3e3b1d..f0459dc 100644 --- a/tools/json_schema_compiler/util.h +++ b/tools/json_schema_compiler/util.h @@ -4,7 +4,6 @@ #ifndef TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ #define TOOLS_JSON_SCHEMA_COMPILER_UTIL_H__ -#pragma once #include <string> #include <vector> diff --git a/tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.h b/tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.h index 05aa362..cabb0240 100644 --- a/tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.h +++ b/tools/measure_page_load_time/ie_bho/MeasurePageLoadTimeBHO.h @@ -4,7 +4,6 @@ // MeasurePageLoadTimeBHO.h : Declaration of the CMeasurePageLoadTimeBHO -#pragma once #include "resource.h" // main symbols #include <shlguid.h> // IID_IWebBrowser2, DIID_DWebBrowserEvents2, et diff --git a/tools/pragmaonce/pragmaonce.py b/tools/pragmaonce/pragmaonce.py deleted file mode 100755 index 22f22a8..0000000 --- a/tools/pragmaonce/pragmaonce.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Tool to add "#pragma once" lines to files that don't have it yet. - -Usage: - find chrome -name '*.h' -exec tools/pragmaonce/pragmaonce.py {} \; -""" - -import re -import sys - - -# Some files have absurdly long comments at the top -NUM_LINES_TO_SCAN_FOR_GUARD = 250 - -def main(filename): - f = open(filename) - lines = f.readlines() - f.close() - - index = -1 - for i in xrange(min(NUM_LINES_TO_SCAN_FOR_GUARD, len(lines) - 1)): - m1 = re.match(r'^#ifndef ([A-Z_0-9]+)$', lines[i]) - m2 = re.match(r'^#define ([A-Z_0-9]+)$', lines[i + 1]) - if m1 and m2: - if m1.group(1) != m2.group(1): - print 'Skipping', filename, \ - ': Broken include guard (%s, %s)' % (m1.group(1), m2.group(1)) - index = i + 2 - break - - if index == -1: - print 'Skipping', filename, ': no include guard found' - return - - if index < len(lines) and re.match(r'#pragma once', lines[index]): - # The pragma is already there. - return 0 - - lines.insert(index, "#pragma once\n") - - f = open(filename, 'w') - f.write(''.join(lines)) - f.close() - return 0 - -if __name__ == '__main__': - if len(sys.argv) != 2: - print >>sys.stderr, "Usage: %s inputfile" % sys.argv[0] - sys.exit(1) - sys.exit(main(sys.argv[1])) |