diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-19 02:12:02 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-19 02:12:02 +0000 |
commit | 9ff681f511172329819e23459050c33b424fe950 (patch) | |
tree | f5d153e72464b8eb2035ae1872b139234d217cc0 /ui | |
parent | b9256cd092d5ebeae70806ef8b0f332dcea3b1d3 (diff) | |
download | chromium_src-9ff681f511172329819e23459050c33b424fe950.zip chromium_src-9ff681f511172329819e23459050c33b424fe950.tar.gz chromium_src-9ff681f511172329819e23459050c33b424fe950.tar.bz2 |
Add instantiation declarations for PointBase, SizeBase, RectBase
These templates have explicit instantiations in point.cc, point_f.cc, size.cc,
size_f.cc, rect.cc, rect_f.cc. This suggests that the intent was to have these
instantiations in a single translation unit. Without an explicit instantiation
declaration, they would still be weakly emitted to all translation units that
use point.h (etc). Add an explicit instantiation declaration to stop this from
happening.
Thanks to Rafael Espindola for help with this patch.
BUG=90078
TEST=do a components debug build on mac. observe fewer linker errors.
Normal builds get a bit faster too.
Review URL: https://chromiumcodereview.appspot.com/10386220
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138012 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gfx/point.h | 4 | ||||
-rw-r--r-- | ui/gfx/point_f.h | 4 | ||||
-rw-r--r-- | ui/gfx/rect.h | 4 | ||||
-rw-r--r-- | ui/gfx/rect_f.h | 4 | ||||
-rw-r--r-- | ui/gfx/size.h | 4 | ||||
-rw-r--r-- | ui/gfx/size_f.h | 4 |
6 files changed, 24 insertions, 0 deletions
diff --git a/ui/gfx/point.h b/ui/gfx/point.h index 156cba2..0ff6294 100644 --- a/ui/gfx/point.h +++ b/ui/gfx/point.h @@ -46,6 +46,10 @@ class UI_EXPORT Point : public PointBase<Point, int> { std::string ToString() const; }; +#if !defined(COMPILER_MSVC) +extern template class PointBase<Point, int>; +#endif + } // namespace gfx #endif // UI_GFX_POINT_H_ diff --git a/ui/gfx/point_f.h b/ui/gfx/point_f.h index c1bf5fb..d681dca 100644 --- a/ui/gfx/point_f.h +++ b/ui/gfx/point_f.h @@ -28,6 +28,10 @@ class UI_EXPORT PointF : public PointBase<PointF, float> { std::string ToString() const; }; +#if !defined(COMPILER_MSVC) +extern template class PointBase<PointF, float>; +#endif + } // namespace gfx #endif // UI_GFX_POINT_F_H_ diff --git a/ui/gfx/rect.h b/ui/gfx/rect.h index d1ffb70..c1983a9 100644 --- a/ui/gfx/rect.h +++ b/ui/gfx/rect.h @@ -67,6 +67,10 @@ class UI_EXPORT Rect : public RectBase<Rect, Point, Size, Insets, int> { std::string ToString() const; }; +#if !defined(COMPILER_MSVC) +extern template class RectBase<Rect, Point, Size, Insets, int>; +#endif + } // namespace gfx #endif // UI_GFX_RECT_H_ diff --git a/ui/gfx/rect_f.h b/ui/gfx/rect_f.h index 401070d..bfb5e86 100644 --- a/ui/gfx/rect_f.h +++ b/ui/gfx/rect_f.h @@ -33,6 +33,10 @@ class UI_EXPORT RectF : public RectBase<RectF, PointF, SizeF, InsetsF, float> { std::string ToString() const; }; +#if !defined(COMPILER_MSVC) +extern template class RectBase<RectF, PointF, SizeF, InsetsF, float>; +#endif + } // namespace gfx #endif // UI_GFX_RECT_H_ diff --git a/ui/gfx/size.h b/ui/gfx/size.h index 56d5611..554f07bd 100644 --- a/ui/gfx/size.h +++ b/ui/gfx/size.h @@ -44,6 +44,10 @@ class UI_EXPORT Size : public SizeBase<Size, int> { std::string ToString() const; }; +#if !defined(COMPILER_MSVC) +extern template class SizeBase<Size, int>; +#endif + } // namespace gfx #endif // UI_GFX_SIZE_H_ diff --git a/ui/gfx/size_f.h b/ui/gfx/size_f.h index b522da8..3a04d19 100644 --- a/ui/gfx/size_f.h +++ b/ui/gfx/size_f.h @@ -26,6 +26,10 @@ class UI_EXPORT SizeF : public SizeBase<SizeF, float> { std::string ToString() const; }; +#if !defined(COMPILER_MSVC) +extern template class SizeBase<SizeF, float>; +#endif + } // namespace gfx #endif // UI_GFX_SIZE_F_H_ |