diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 19:10:03 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-30 19:10:03 +0000 |
commit | 6d445d3505284cc5d0310c46a68f096845fcd848 (patch) | |
tree | ba3d2233e9ce122ec0452311aee426469d7acb87 /base/logging.cc | |
parent | 15baed1691e3d6c5c129a95efac961fc24474df6 (diff) | |
download | chromium_src-6d445d3505284cc5d0310c46a68f096845fcd848.zip chromium_src-6d445d3505284cc5d0310c46a68f096845fcd848.tar.gz chromium_src-6d445d3505284cc5d0310c46a68f096845fcd848.tar.bz2 |
Mark the most common uses of MakeCheckOpString as extern templates on gcc platforms.
Remove broken template specializations that were never instantiated that
references extern code that doesn't exist in the project (!).
BUG=none
TEST=compiles, smaller binaries on linux, chromeos and mac
Review URL: http://codereview.chromium.org/3594003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61092 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/logging.cc')
-rw-r--r-- | base/logging.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/base/logging.cc b/base/logging.cc index ef1a746..f0c6217 100644 --- a/base/logging.cc +++ b/base/logging.cc @@ -409,6 +409,20 @@ void SetLogMessageHandler(LogMessageHandlerFunction handler) { log_message_handler = handler; } +// MSVC doesn't like complex extern templates and DLLs. +#if !defined(COMPILER_MSVC) +// Explicit instantiations for commonly used comparisons. +template std::string* MakeCheckOpString<int, int>( + const int&, const int&, const char* names); +template std::string* MakeCheckOpString<unsigned long, unsigned long>( + const unsigned long&, const unsigned long&, const char* names); +template std::string* MakeCheckOpString<unsigned long, unsigned int>( + const unsigned long&, const unsigned int&, const char* names); +template std::string* MakeCheckOpString<unsigned int, unsigned long>( + const unsigned int&, const unsigned long&, const char* names); +template std::string* MakeCheckOpString<std::string, std::string>( + const std::string&, const std::string&, const char* name); +#endif // Displays a message box to the user with the error message in it. // Used for fatal messages, where we close the app simultaneously. |