clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name StartMarker.cxx -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -mrelocation-model pic -pic-level 2 -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/lib64/clang/11.0.0 -D BOOST_ERROR_CODE_HEADER_ONLY -D BOOST_SYSTEM_NO_DEPRECATED -D CPPU_ENV=gcc3 -D LINUX -D OSL_DEBUG_LEVEL=1 -D SAL_LOG_INFO -D SAL_LOG_WARN -D UNIX -D UNX -D X86_64 -D _PTHREADS -D _REENTRANT -D EXCEPTIONS_ON -D LIBO_INTERNAL_ONLY -I /home/maarten/src/libreoffice/core/external/boost/include -I /home/maarten/src/libreoffice/core/workdir/UnpackedTarball/boost -I /home/maarten/src/libreoffice/core/include -I /usr/lib/jvm/java-11-openjdk-11.0.9.10-0.0.ea.fc33.x86_64/include -I /usr/lib/jvm/java-11-openjdk-11.0.9.10-0.0.ea.fc33.x86_64/include/linux -I /home/maarten/src/libreoffice/core/config_host -I /home/maarten/src/libreoffice/core/reportdesign/inc -I /home/maarten/src/libreoffice/core/reportdesign/source/inc -I /home/maarten/src/libreoffice/core/reportdesign/source/ui/inc -I /home/maarten/src/libreoffice/core/workdir/UnoApiHeadersTarget/udkapi/normal -I /home/maarten/src/libreoffice/core/workdir/UnoApiHeadersTarget/offapi/normal -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10 -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/x86_64-redhat-linux -internal-isystem /usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../include/c++/10/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/11.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O0 -Wno-missing-braces -std=c++17 -fdeprecated-macro -fdebug-compilation-dir /home/maarten/src/libreoffice/core -ferror-limit 19 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 2 -fgnuc-version=4.2.1 -fcxx-exceptions -fexceptions -debug-info-kind=constructor -analyzer-output=html -faddrsig -o /home/maarten/tmp/wis/scan-build-libreoffice/output/report/2020-10-07-141433-9725-1 -x c++ /home/maarten/src/libreoffice/core/reportdesign/source/ui/report/StartMarker.cxx
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | #include <StartMarker.hxx> |
20 | #include <UITools.hxx> |
21 | #include <vcl/image.hxx> |
22 | #include <vcl/svapp.hxx> |
23 | #include <bitmaps.hlst> |
24 | #include <ColorChanger.hxx> |
25 | #include <ReportDefines.hxx> |
26 | #include <SectionWindow.hxx> |
27 | #include <helpids.h> |
28 | #include <vcl/event.hxx> |
29 | #include <vcl/help.hxx> |
30 | #include <vcl/gradient.hxx> |
31 | #include <vcl/lineinfo.hxx> |
32 | #include <vcl/settings.hxx> |
33 | |
34 | #include <unotools/syslocale.hxx> |
35 | #include <unotools/localedatawrapper.hxx> |
36 | |
37 | #define CORNER_SPACE 5 |
38 | |
39 | |
40 | namespace rptui |
41 | { |
42 | |
43 | |
44 | Image* OStartMarker::s_pDefCollapsed = nullptr; |
45 | Image* OStartMarker::s_pDefExpanded = nullptr; |
46 | oslInterlockedCount OStartMarker::s_nImageRefCount = 0; |
47 | |
48 | |
49 | OStartMarker::OStartMarker(OSectionWindow* _pParent,const OUString& _sColorEntry) |
50 | : OColorListener(_pParent,_sColorEntry) |
51 | ,m_aVRuler(VclPtr<Ruler>::Create(this,WB_VERT)) |
52 | ,m_aText(VclPtr<FixedText>::Create(this,WB_HYPHENATION)) |
53 | ,m_aImage(VclPtr<FixedImage>::Create(this,WB_LEFT|WB_TOP|WB_SCALE)) |
54 | ,m_pParent(_pParent) |
55 | ,m_bShowRuler(true) |
56 | { |
57 | osl_atomic_increment(&s_nImageRefCount); |
58 | initDefaultNodeImages(); |
59 | ImplInitSettings(); |
60 | m_aText->SetHelpId(HID_RPT_START_TITLE); |
61 | m_aText->SetPaintTransparent(true); |
62 | m_aImage->SetHelpId(HID_RPT_START_IMAGE); |
63 | m_aText->Show(); |
64 | m_aImage->Show(); |
65 | m_aVRuler->Show(); |
66 | m_aVRuler->Activate(); |
67 | m_aVRuler->SetPagePos(); |
68 | m_aVRuler->SetBorders(); |
69 | m_aVRuler->SetIndents(); |
70 | m_aVRuler->SetMargin1(); |
71 | m_aVRuler->SetMargin2(); |
72 | const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); |
73 | m_aVRuler->SetUnit(MeasurementSystem::Metric == eSystem ? FieldUnit::CM : FieldUnit::INCH); |
74 | EnableChildTransparentMode(); |
75 | SetParentClipMode( ParentClipMode::NoClip ); |
76 | SetPaintTransparent( true ); |
77 | } |
78 | |
79 | OStartMarker::~OStartMarker() |
80 | { |
81 | disposeOnce(); |
82 | } |
83 | |
84 | void OStartMarker::dispose() |
85 | { |
86 | if ( osl_atomic_decrement(&s_nImageRefCount) == 0 ) |
87 | { |
88 | delete s_pDefCollapsed; |
89 | s_pDefCollapsed = nullptr; |
90 | delete s_pDefExpanded; |
91 | s_pDefExpanded = nullptr; |
92 | } |
93 | m_aVRuler.disposeAndClear(); |
94 | m_aText.disposeAndClear(); |
95 | m_aImage.disposeAndClear(); |
96 | m_pParent.clear(); |
97 | OColorListener::dispose(); |
98 | } |
99 | |
100 | sal_Int32 OStartMarker::getMinHeight() const |
101 | { |
102 | Fraction aExtraWidth(long(2 * REPORT_EXTRA_SPACE)); |
103 | aExtraWidth *= GetMapMode().GetScaleX(); |
104 | return LogicToPixel(Size(0, m_aText->GetTextHeight())).Height() + long(aExtraWidth); |
105 | } |
106 | |
107 | void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& ) |
108 | { |
109 | Size aSize(GetOutputSizePixel()); |
110 | const long nCornerWidth = long(CORNER_SPACE * double(GetMapMode().GetScaleX())); |
111 | |
112 | if (isCollapsed()) |
| 1 | Assuming the condition is true | |
|
| |
113 | { |
114 | rRenderContext.SetClipRegion(); |
115 | } |
116 | else |
117 | { |
118 | const long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); |
119 | long nSize = aSize.Width() - nVRulerWidth; |
120 | aSize.AdjustWidth(nCornerWidth ); |
121 | rRenderContext.SetClipRegion(vcl::Region(rRenderContext.PixelToLogic(tools::Rectangle(Point(), |
122 | Size(nSize, aSize.Height()))))); |
123 | } |
124 | |
125 | tools::Rectangle aWholeRect(Point(), aSize); |
126 | { |
127 | const ColorChanger aColors(&rRenderContext, m_nTextBoundaries, m_nColor); |
128 | tools::PolyPolygon aPoly; |
129 | aPoly.Insert( tools::Polygon(aWholeRect,nCornerWidth,nCornerWidth)); |
130 | |
131 | Color aStartColor(m_nColor); |
132 | aStartColor.IncreaseLuminance(10); |
133 | sal_uInt16 nHue = 0; |
134 | sal_uInt16 nSat = 0; |
135 | sal_uInt16 nBri = 0; |
136 | aStartColor.RGBtoHSB(nHue, nSat, nBri); |
137 | nSat += 40; |
138 | Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri)); |
139 | Gradient aGradient(GradientStyle::Linear,aStartColor,aEndColor); |
140 | aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height())); |
141 | |
142 | rRenderContext.DrawGradient(PixelToLogic(aPoly) ,aGradient); |
143 | } |
| |
| 14 | | Returning from '~ColorChanger' | |
|
144 | if (m_bMarked) |
| 15 | | Assuming field 'm_bMarked' is true | |
|
| |
145 | { |
146 | const long nCornerHeight = long(CORNER_SPACE * double(GetMapMode().GetScaleY())); |
147 | tools::Rectangle aRect(Point(nCornerWidth, nCornerHeight), |
148 | Size(aSize.Width() - nCornerWidth - nCornerWidth, |
149 | aSize.Height() - nCornerHeight - nCornerHeight)); |
150 | ColorChanger aColors(&rRenderContext, COL_WHITE, COL_WHITE); |
| 17 | | Use of memory after it is freed |
|
151 | rRenderContext.DrawPolyLine( tools::Polygon(rRenderContext.PixelToLogic(aRect)), |
152 | LineInfo(LineStyle::Solid, 2)); |
153 | } |
154 | } |
155 | |
156 | void OStartMarker::setColor() |
157 | { |
158 | const Color aColor(m_nColor); |
159 | Color aTextColor = GetTextColor(); |
160 | if ( aColor.GetLuminance() < 128 ) |
161 | aTextColor = COL_WHITE; |
162 | m_aText->SetTextColor(aTextColor); |
163 | m_aText->SetLineColor(m_nColor); |
164 | } |
165 | |
166 | void OStartMarker::MouseButtonUp( const MouseEvent& rMEvt ) |
167 | { |
168 | if ( !rMEvt.IsLeft() ) |
169 | return; |
170 | |
171 | Point aPos( rMEvt.GetPosPixel()); |
172 | |
173 | const Size aOutputSize = GetOutputSizePixel(); |
174 | if( aPos.X() > aOutputSize.Width() || aPos.Y() > aOutputSize.Height() ) |
175 | return; |
176 | tools::Rectangle aRect(m_aImage->GetPosPixel(),m_aImage->GetSizePixel()); |
177 | if ( rMEvt.GetClicks() == 2 || aRect.IsInside( aPos ) ) |
178 | { |
179 | m_bCollapsed = !m_bCollapsed; |
180 | |
181 | changeImage(); |
182 | |
183 | m_aVRuler->Show(!m_bCollapsed && m_bShowRuler); |
184 | m_aCollapsedLink.Call(*this); |
185 | } |
186 | |
187 | m_pParent->showProperties(); |
188 | } |
189 | |
190 | void OStartMarker::changeImage() |
191 | { |
192 | Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; |
193 | m_aImage->SetImage(*pImage); |
194 | } |
195 | |
196 | void OStartMarker::initDefaultNodeImages() |
197 | { |
198 | if ( !s_pDefCollapsed ) |
199 | { |
200 | s_pDefCollapsed = new Image(StockImage::Yes, RID_BMP_TREENODE_COLLAPSED); |
201 | s_pDefExpanded = new Image(StockImage::Yes, RID_BMP_TREENODE_EXPANDED); |
202 | } |
203 | |
204 | Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; |
205 | m_aImage->SetImage(*pImage); |
206 | m_aImage->SetMouseTransparent(true); |
207 | m_aImage->SetBackground(); |
208 | m_aText->SetBackground(); |
209 | m_aText->SetMouseTransparent(true); |
210 | } |
211 | |
212 | void OStartMarker::ApplySettings(vcl::RenderContext& rRenderContext) |
213 | { |
214 | rRenderContext.SetBackground(); |
215 | rRenderContext.SetFillColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); |
216 | setColor(); |
217 | } |
218 | |
219 | void OStartMarker::ImplInitSettings() |
220 | { |
221 | ApplySettings(*this); |
222 | } |
223 | |
224 | void OStartMarker::Resize() |
225 | { |
226 | const Size aOutputSize( GetOutputSizePixel() ); |
227 | const long nOutputWidth = aOutputSize.Width(); |
228 | const long nOutputHeight = aOutputSize.Height(); |
229 | |
230 | const long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); |
231 | const Point aRulerPos(nOutputWidth - nVRulerWidth,0); |
232 | m_aVRuler->SetPosSizePixel(aRulerPos,Size(nVRulerWidth,nOutputHeight)); |
233 | |
234 | Size aImageSize = m_aImage->GetImage().GetSizePixel(); |
235 | const MapMode& rMapMode = GetMapMode(); |
236 | aImageSize.setWidth( long(aImageSize.Width() * static_cast<double>(rMapMode.GetScaleX())) ); |
237 | aImageSize.setHeight( long(aImageSize.Height() * static_cast<double>(rMapMode.GetScaleY())) ); |
238 | |
239 | long nExtraWidth = long(REPORT_EXTRA_SPACE * rMapMode.GetScaleX()); |
240 | |
241 | Point aPos(aImageSize.Width() + (nExtraWidth * 2), nExtraWidth); |
242 | const long nHeight = ::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText->GetTextHeight())).Height()); |
243 | m_aText->SetPosSizePixel(aPos,Size(aRulerPos.X() - aPos.X(),nHeight)); |
244 | |
245 | aPos.setX( nExtraWidth ); |
246 | aPos.AdjustY(static_cast<sal_Int32>((LogicToPixel(Size(0,m_aText->GetTextHeight())).Height() - aImageSize.Height()) * 0.5) ) ; |
247 | m_aImage->SetPosSizePixel(aPos,aImageSize); |
248 | } |
249 | |
250 | void OStartMarker::setTitle(const OUString& _sTitle) |
251 | { |
252 | m_aText->SetText(_sTitle); |
253 | } |
254 | |
255 | void OStartMarker::Notify(SfxBroadcaster & rBc, SfxHint const & rHint) |
256 | { |
257 | OColorListener::Notify(rBc, rHint); |
258 | if (rHint.GetId() == SfxHintId::ColorsChanged) |
259 | { |
260 | setColor(); |
261 | Invalidate(InvalidateFlags::Children); |
262 | } |
263 | } |
264 | |
265 | void OStartMarker::showRuler(bool _bShow) |
266 | { |
267 | m_bShowRuler = _bShow; |
268 | m_aVRuler->Show(!m_bCollapsed && m_bShowRuler); |
269 | } |
270 | |
271 | void OStartMarker::RequestHelp( const HelpEvent& rHEvt ) |
272 | { |
273 | if( m_aText->GetText().isEmpty()) |
274 | return; |
275 | |
276 | |
277 | tools::Rectangle aItemRect(rHEvt.GetMousePosPixel(),Size(GetSizePixel().Width(),getMinHeight())); |
278 | Point aPt = OutputToScreenPixel( aItemRect.TopLeft() ); |
279 | aItemRect.SetLeft( aPt.X() ); |
280 | aItemRect.SetTop( aPt.Y() ); |
281 | aPt = OutputToScreenPixel( aItemRect.BottomRight() ); |
282 | aItemRect.SetRight( aPt.X() ); |
283 | aItemRect.SetBottom( aPt.Y() ); |
284 | if( rHEvt.GetMode() == HelpEventMode::BALLOON ) |
285 | Help::ShowBalloon( this, aItemRect.Center(), aItemRect, m_aText->GetText()); |
286 | else |
287 | Help::ShowQuickHelp( this, aItemRect, m_aText->GetText() ); |
288 | } |
289 | |
290 | void OStartMarker::setCollapsed(bool _bCollapsed) |
291 | { |
292 | OColorListener::setCollapsed(_bCollapsed); |
293 | showRuler(_bCollapsed); |
294 | changeImage(); |
295 | } |
296 | |
297 | void OStartMarker::zoom(const Fraction& _aZoom) |
298 | { |
299 | setZoomFactor(_aZoom,*this); |
300 | m_aVRuler->SetZoom(_aZoom); |
301 | setZoomFactor(_aZoom, *m_aText); |
302 | Resize(); |
303 | Invalidate(); |
304 | } |
305 | |
306 | |
307 | } |
308 | |
309 | |
310 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | #ifndef INCLUDED_RTL_REF_HXX |
21 | #define INCLUDED_RTL_REF_HXX |
22 | |
23 | #include "sal/config.h" |
24 | |
25 | #include <cassert> |
26 | #include <cstddef> |
27 | #include <functional> |
28 | #ifdef LIBO_INTERNAL_ONLY |
29 | #include <type_traits> |
30 | #endif |
31 | |
32 | #include "sal/types.h" |
33 | |
34 | namespace rtl |
35 | { |
36 | |
37 | |
38 | |
39 | template <class reference_type> |
40 | class Reference |
41 | { |
42 | |
43 | |
44 | reference_type * m_pBody; |
45 | |
46 | |
47 | public: |
48 | |
49 | |
50 | Reference() |
51 | : m_pBody (NULL) |
52 | {} |
53 | |
54 | |
55 | |
56 | |
57 | Reference (reference_type * pBody, __sal_NoAcquire) |
58 | : m_pBody (pBody) |
59 | { |
60 | } |
61 | |
62 | |
63 | |
64 | Reference (reference_type * pBody) |
65 | : m_pBody (pBody) |
66 | { |
67 | if (m_pBody) |
68 | m_pBody->acquire(); |
69 | } |
70 | |
71 | |
72 | |
73 | Reference (const Reference<reference_type> & handle) |
74 | : m_pBody (handle.m_pBody) |
75 | { |
76 | if (m_pBody) |
77 | m_pBody->acquire(); |
78 | } |
79 | |
80 | #ifdef LIBO_INTERNAL_ONLY |
81 | |
82 | |
83 | Reference (Reference<reference_type> && handle) noexcept |
84 | : m_pBody (handle.m_pBody) |
85 | { |
86 | handle.m_pBody = nullptr; |
87 | } |
88 | #endif |
89 | |
90 | #if defined LIBO_INTERNAL_ONLY |
91 | |
92 | |
93 | |
94 | |
95 | |
96 | |
97 | template< class derived_type > |
98 | inline Reference( |
99 | const Reference< derived_type > & rRef, |
100 | std::enable_if_t<std::is_base_of_v<reference_type, derived_type>, int> = 0 ) |
101 | : m_pBody (rRef.get()) |
102 | { |
103 | if (m_pBody) |
104 | m_pBody->acquire(); |
105 | } |
106 | #endif |
107 | |
108 | |
109 | |
110 | ~Reference() COVERITY_NOEXCEPT_FALSE |
111 | { |
112 | if (m_pBody) |
| |
113 | m_pBody->release(); |
| 7 | | Calling 'VclReferenceBase::release' | |
|
| 11 | | Returning; memory was released | |
|
114 | } |
115 | |
116 | |
117 | |
118 | |
119 | Reference<reference_type> & |
120 | SAL_CALL set (reference_type * pBody) |
121 | { |
122 | if (pBody) |
123 | pBody->acquire(); |
124 | reference_type * const pOld = m_pBody; |
125 | m_pBody = pBody; |
126 | if (pOld) |
127 | pOld->release(); |
128 | return *this; |
129 | } |
130 | |
131 | |
132 | |
133 | |
134 | |
135 | Reference<reference_type> & |
136 | SAL_CALL operator= (const Reference<reference_type> & handle) |
137 | { |
138 | return set( handle.m_pBody ); |
139 | } |
140 | |
141 | #ifdef LIBO_INTERNAL_ONLY |
142 | |
143 | |
144 | |
145 | |
146 | |
147 | Reference<reference_type> & |
148 | operator= (Reference<reference_type> && handle) |
149 | { |
150 | |
151 | if (m_pBody) |
152 | m_pBody->release(); |
153 | m_pBody = handle.m_pBody; |
154 | handle.m_pBody = nullptr; |
155 | return *this; |
156 | } |
157 | #endif |
158 | |
159 | |
160 | |
161 | Reference<reference_type> & |
162 | SAL_CALL operator= (reference_type * pBody) |
163 | { |
164 | return set( pBody ); |
165 | } |
166 | |
167 | |
168 | |
169 | |
170 | |
171 | |
172 | |
173 | |
174 | Reference<reference_type> & SAL_CALL clear() |
175 | { |
176 | if (m_pBody) |
177 | { |
178 | reference_type * const pOld = m_pBody; |
179 | m_pBody = NULL; |
180 | pOld->release(); |
181 | } |
182 | return *this; |
183 | } |
184 | |
185 | |
186 | |
187 | |
188 | |
189 | |
190 | reference_type * SAL_CALL get() const |
191 | { |
192 | return m_pBody; |
193 | } |
194 | |
195 | |
196 | |
197 | |
198 | reference_type * SAL_CALL operator->() const |
199 | { |
200 | assert(m_pBody != NULL); |
201 | return m_pBody; |
202 | } |
203 | |
204 | |
205 | |
206 | |
207 | reference_type & SAL_CALL operator*() const |
208 | { |
209 | assert(m_pBody != NULL); |
210 | return *m_pBody; |
211 | } |
212 | |
213 | |
214 | |
215 | |
216 | bool SAL_CALL is() const |
217 | { |
218 | return (m_pBody != NULL); |
219 | } |
220 | |
221 | #if defined LIBO_INTERNAL_ONLY |
222 | |
223 | |
224 | explicit operator bool() const |
225 | { |
226 | return is(); |
227 | } |
228 | #endif |
229 | |
230 | |
231 | |
232 | bool SAL_CALL operator== (const reference_type * pBody) const |
233 | { |
234 | return (m_pBody == pBody); |
235 | } |
236 | |
237 | |
238 | |
239 | |
240 | bool |
241 | SAL_CALL operator== (const Reference<reference_type> & handle) const |
242 | { |
243 | return (m_pBody == handle.m_pBody); |
244 | } |
245 | |
246 | |
247 | |
248 | |
249 | bool |
250 | SAL_CALL operator!= (const Reference<reference_type> & handle) const |
251 | { |
252 | return (m_pBody != handle.m_pBody); |
253 | } |
254 | |
255 | |
256 | |
257 | |
258 | bool |
259 | SAL_CALL operator< (const Reference<reference_type> & handle) const |
260 | { |
261 | return (m_pBody < handle.m_pBody); |
262 | } |
263 | |
264 | |
265 | |
266 | |
267 | bool |
268 | SAL_CALL operator> (const Reference<reference_type> & handle) const |
269 | { |
270 | return (m_pBody > handle.m_pBody); |
271 | } |
272 | }; |
273 | |
274 | } |
275 | |
276 | #if defined LIBO_INTERNAL_ONLY |
277 | namespace std |
278 | { |
279 | |
280 | |
281 | |
282 | |
283 | |
284 | |
285 | |
286 | template<typename T> |
287 | struct hash<::rtl::Reference<T>> |
288 | { |
289 | std::size_t operator()(::rtl::Reference<T> const & s) const |
290 | { return std::size_t(s.get()); } |
291 | }; |
292 | |
293 | |
294 | } |
295 | |
296 | #endif |
297 | |
298 | #endif /* ! INCLUDED_RTL_REF_HXX */ |
299 | |
300 | |