Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: chrome/installer/mini_installer/mini_string.h

Issue 1248483002: clang/win: Fix another -Wunused-local-typedef warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ 5 #ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_
6 #define CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ 6 #define CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_
7 7
8 #ifndef COMPILE_ASSERT 8 #ifndef COMPILE_ASSERT
9 // COMPILE_ASSERT macro borrowed from basictypes.h 9 // COMPILE_ASSERT macro borrowed from macros.h
10 template <bool> 10 #define COMPILE_ASSERT(expr, msg) static_assert(expr, #msg)
11 struct CompileAssert {};
12 #define COMPILE_ASSERT(expr, msg) \
13 typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
14 #endif 11 #endif
15 12
16 namespace mini_installer { 13 namespace mini_installer {
17 14
18 // NOTE: Do not assume that these string functions support UTF encoding. 15 // NOTE: Do not assume that these string functions support UTF encoding.
19 // This is fine for the purposes of the mini_installer, but you have 16 // This is fine for the purposes of the mini_installer, but you have
20 // been warned! 17 // been warned!
21 18
22 // Formats a sequence of |bytes| as hex. The |str| buffer must have room for 19 // Formats a sequence of |bytes| as hex. The |str| buffer must have room for
23 // at least 2*|size| + 1. 20 // at least 2*|size| + 1.
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 wchar_t buffer_[kCapacity + 1]; 136 wchar_t buffer_[kCapacity + 1];
140 137
141 private: 138 private:
142 StackString(const StackString&); 139 StackString(const StackString&);
143 StackString& operator=(const StackString&); 140 StackString& operator=(const StackString&);
144 }; 141 };
145 142
146 } // namespace mini_installer 143 } // namespace mini_installer
147 144
148 #endif // CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_ 145 #endif // CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698