[commit] r2524 - trunk/SDK/DecoratorLib
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Sep 4 15:02:03 CDT 2014
Author: ksmyth
Date: Thu Sep 4 15:02:03 2014
New Revision: 2524
Log:
Dont require exceptions to return E_NOTIMPL
Modified:
trunk/SDK/DecoratorLib/CompositePart.cpp
Modified: trunk/SDK/DecoratorLib/CompositePart.cpp
==============================================================================
--- trunk/SDK/DecoratorLib/CompositePart.cpp Wed Sep 3 10:26:36 2014 (r2523)
+++ trunk/SDK/DecoratorLib/CompositePart.cpp Thu Sep 4 15:02:03 2014 (r2524)
@@ -203,6 +203,7 @@
{
HRESULT retVal = S_OK;
for (std::vector<PartBase*>::const_iterator ii = m_compositeParts.begin(); ii != m_compositeParts.end(); ++ii) {
+ HRESULT retVal = E_DECORATOR_NOT_IMPLEMENTED;
try {
CSize preferredSize = (*ii)->GetPreferredSize();
if (preferredSize != CSize(0, 0))
@@ -215,12 +216,9 @@
retVal = e.GetHResult();
}
if (retVal != E_DECORATOR_NOT_IMPLEMENTED)
- break;
+ throw DecoratorException((DecoratorExceptionCode)retVal);
}
- if (retVal != S_OK)
- throw DecoratorException((DecoratorExceptionCode)retVal);
-
return CSize(0, 0);
}
@@ -234,8 +232,8 @@
CRect CompositePart::GetLocation(void) const
{
- HRESULT retVal = S_OK;
for (std::vector<PartBase*>::const_iterator ii = m_compositeParts.begin(); ii != m_compositeParts.end(); ++ii) {
+ HRESULT retVal = E_DECORATOR_NOT_IMPLEMENTED;
try {
CRect location = (*ii)->GetLocation();
if (!location.IsRectEmpty())
@@ -248,19 +246,16 @@
retVal = e.GetHResult();
}
if (retVal != E_DECORATOR_NOT_IMPLEMENTED)
- break;
+ throw DecoratorException((DecoratorExceptionCode)retVal);
}
- if (retVal != S_OK)
- throw DecoratorException((DecoratorExceptionCode)retVal);
-
return CRect(0,0,0,0);
}
CRect CompositePart::GetLabelLocation(void) const
{
- HRESULT retVal = S_OK;
for (std::vector<PartBase*>::const_iterator ii = m_compositeParts.begin(); ii != m_compositeParts.end(); ++ii) {
+ HRESULT retVal = E_DECORATOR_NOT_IMPLEMENTED;
try {
CRect labelLocation = (*ii)->GetLabelLocation();
if (!labelLocation.IsRectEmpty())
@@ -273,12 +268,9 @@
retVal = e.GetHResult();
}
if (retVal != E_DECORATOR_NOT_IMPLEMENTED)
- break;
+ throw DecoratorException((DecoratorExceptionCode)retVal);
}
- if (retVal != S_OK)
- throw DecoratorException((DecoratorExceptionCode)retVal);
-
return CRect(0,0,0,0);
}
More information about the gme-commit
mailing list