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

Unified Diff: chrome/installer/mini_installer/mini_string.h

Issue 821673004: replace COMPILE_ASSERT with static_assert in chrome/installer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/mini_installer/mini_string.h
diff --git a/chrome/installer/mini_installer/mini_string.h b/chrome/installer/mini_installer/mini_string.h
index c32f78a127f81e26f1839eb833765383c4fec223..c97817cce7954d3ccb344f9aadefc3db6f5dbec7 100644
--- a/chrome/installer/mini_installer/mini_string.h
+++ b/chrome/installer/mini_installer/mini_string.h
@@ -5,13 +5,6 @@
#ifndef CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_
#define CHROME_INSTALLER_MINI_INSTALLER_MINI_STRING_H_
-#ifndef COMPILE_ASSERT
-// COMPILE_ASSERT macro borrowed from basictypes.h
-template <bool>
-struct CompileAssert {};
-#define COMPILE_ASSERT(expr, msg) \
- typedef CompileAssert<(bool(expr))> msg[bool(expr) ? 1 : -1]
-#endif
namespace mini_installer {
@@ -72,7 +65,7 @@ template <size_t kCapacity>
class StackString {
public:
StackString() {
- COMPILE_ASSERT(kCapacity != 0, invalid_buffer_size);
+ static_assert(kCapacity != 0, "invalid buffer size");
buffer_[kCapacity] = L'\0'; // We always reserve 1 more than asked for.
clear();
}
« no previous file with comments | « no previous file | chrome/installer/setup/setup_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698