[commit] r2623 - in trunk/GME: Gme Mga
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Apr 13 11:25:36 CDT 2016
Author: ksmyth
Date: Wed Apr 13 11:25:36 2016
New Revision: 2623
Log:
Formatting
Modified:
trunk/GME/Gme/GMEApp.cpp
trunk/GME/Mga/MgaDeriveOps.cpp
trunk/GME/Mga/MgaReference.cpp
trunk/GME/Mga/MgaReference.h
Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp Wed Apr 13 11:25:32 2016 (r2622)
+++ trunk/GME/Gme/GMEApp.cpp Wed Apr 13 11:25:36 2016 (r2623)
@@ -2391,9 +2391,9 @@
if( CMainFrame::theInstance) CMainFrame::theInstance->m_console.Message( CString( _T("Importing ")) + file_name + _T("..."), 1);
IMgaParser2Ptr parser2 = (IMgaParser*)parser;
if (parser2 && m_pMainWnd)
- parser2->__ParseProject2(theApp.mgaProject,_bstr_t(fullPath), (ULONGLONG)(m_pMainWnd->GetSafeHwnd()));
+ parser2->__ParseProject2(theApp.mgaProject, _bstr_t(fullPath), (ULONGLONG)(m_pMainWnd->GetSafeHwnd()));
else
- COMTHROW(parser->ParseProject(theApp.mgaProject,PutInBstr(fullPath)) );
+ COMTHROW(parser->ParseProject(theApp.mgaProject, PutInBstr(fullPath)));
// mgaproject has been filled with data, let's update title:
UpdateProjectName();
Modified: trunk/GME/Mga/MgaDeriveOps.cpp
==============================================================================
--- trunk/GME/Mga/MgaDeriveOps.cpp Wed Apr 13 11:25:32 2016 (r2622)
+++ trunk/GME/Mga/MgaDeriveOps.cpp Wed Apr 13 11:25:36 2016 (r2623)
@@ -166,7 +166,7 @@
// ----------------------------------------
// check if the original master of this relation is internal or external
-// does not check the internality of references whithin connections!!!!!!
+// does not check the internality of references within connections!
bool IsInternalRelation(CoreObj src) {
CoreObj m;
while((m = src.GetMaster()) != NULL) src = m;
Modified: trunk/GME/Mga/MgaReference.cpp
==============================================================================
--- trunk/GME/Mga/MgaReference.cpp Wed Apr 13 11:25:32 2016 (r2622)
+++ trunk/GME/Mga/MgaReference.cpp Wed Apr 13 11:25:36 2016 (r2623)
@@ -138,7 +138,8 @@
COMTRY_IN_TRANSACTION {
CheckWrite();
CoreObj base = self[ATTRID_DERIVED];
- if(!base) COMTHROW(E_MGA_NOT_DERIVED);
+ if (!base)
+ COMTHROW(E_MGA_NOT_DERIVED);
std::vector<CoreObj> peer(1);
CoreObj rb;
int d;
@@ -146,8 +147,12 @@
CoreObj subt = self.FollowChain(ATTRID_FCOPARENT,d);
// if it is external in the most original base, the target must be kept the same
bool isinternal = IsInternalRelation(base);
- if(isinternal) GetDerivedEquivalent(base[ATTRID_REFERENCE],subt,peer[0]);
- else peer[0] = base[ATTRID_REFERENCE];
+ if (isinternal) {
+ GetDerivedEquivalent(base[ATTRID_REFERENCE], subt, peer[0]);
+ }
+ else {
+ peer[0] = base[ATTRID_REFERENCE];
+ }
self[ATTRID_MASTEROBJ] = base;
putreftask(!isinternal).DoWithDeriveds(self, &peer);
} COMCATCH_IN_TRANSACTION(;);
Modified: trunk/GME/Mga/MgaReference.h
==============================================================================
--- trunk/GME/Mga/MgaReference.h Wed Apr 13 11:25:32 2016 (r2622)
+++ trunk/GME/Mga/MgaReference.h Wed Apr 13 11:25:36 2016 (r2623)
@@ -46,7 +46,12 @@
bool Do(CoreObj self, std::vector<CoreObj> *peers = NULL);
public:
// isext is true if the relation is sure to be external, false if not known
- putreftask(bool isext) { masterattr = ATTRID_MASTEROBJ; if(isext) endreserve = 1; };
+ putreftask(bool isext) {
+ masterattr = ATTRID_MASTEROBJ;
+ if (isext) {
+ endreserve = 1;
+ }
+ };
};
#endif //__MGAREFERENCE_H_
More information about the gme-commit
mailing list