[Mobies-commit] [commit] r3645 - in UDM/trunk/src: UML GME/ExprChecker Udm Udm/File2Code UdmBase UdmGme UdmOcl
endre at redhat1.isis.vanderbilt.edu
endre at redhat1.isis.vanderbilt.edu
Fri Feb 18 14:17:07 CST 2011
Author: endre
Date: Fri Feb 18 14:17:06 2011
New Revision: 3645
Log:
Use std::string::size_type instead of unsigned int to fix problems on 64 bits platforms
Modified:
UDM/trunk/src/UML GME/ExprChecker/GMESyntacticSemanticDialog.cpp
UDM/trunk/src/UML GME/ExprChecker/UMLTypeEx.cpp
UDM/trunk/src/Udm/ClassGen.cpp
UDM/trunk/src/Udm/DiagramGen.cpp
UDM/trunk/src/Udm/File2Code/File2Code.cpp
UDM/trunk/src/UdmBase/DTDGen.cpp
UDM/trunk/src/UdmBase/UdmBase.cpp
UDM/trunk/src/UdmGme/UdmGme.cpp
UDM/trunk/src/UdmOcl/UdmOcl.cpp
UDM/trunk/src/UdmOcl/UdmOclType.cpp
Modified: UDM/trunk/src/UML GME/ExprChecker/GMESyntacticSemanticDialog.cpp
==============================================================================
--- UDM/trunk/src/UML GME/ExprChecker/GMESyntacticSemanticDialog.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/UML GME/ExprChecker/GMESyntacticSemanticDialog.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -283,7 +283,7 @@
{
int iDefinitions = m_vecConstraintDefinitions.size();
std::string strDName = ( iPos >= iDefinitions ) ? m_vecConstraints[ iPos - iDefinitions ]->GetDefinedName() : m_vecConstraintDefinitions[ iPos ]->GetDefinedName();
- int iColonPos = strDName.rfind( "::" );
+ std::string::size_type iColonPos = strDName.rfind( "::" );
if ( iColonPos == std::string::npos ) {
strContext = "?";
Modified: UDM/trunk/src/UML GME/ExprChecker/UMLTypeEx.cpp
==============================================================================
--- UDM/trunk/src/UML GME/ExprChecker/UMLTypeEx.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/UML GME/ExprChecker/UMLTypeEx.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -496,8 +496,8 @@
if (bIsQualified)
{
- unsigned int loc1 = strName.find("::");
- unsigned int loc2 = strName.rfind("::");
+ std::string::size_type loc1 = strName.find("::");
+ std::string::size_type loc2 = strName.rfind("::");
if (loc1 != loc2)
{
strDgrName = strName.substr(0, loc1);
Modified: UDM/trunk/src/Udm/ClassGen.cpp
==============================================================================
--- UDM/trunk/src/Udm/ClassGen.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/Udm/ClassGen.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -25,7 +25,7 @@
static string GetNsfromFromStr(const string& fromstr )
{
- unsigned int i = fromstr.find(':');
+ string::size_type i = fromstr.find(':');
if (i == string::npos)
return "";
return fromstr.substr(i +1, string::npos);
@@ -34,7 +34,7 @@
static string GetCPPNamefromFromStr(const string& fromstr)
{
- unsigned int i = fromstr.find(':');
+ string::size_type i = fromstr.find(':');
string ret = "::" + fromstr.substr(0, i);
if (i != string::npos)
ret += "::" + UdmUtil::replace_delimiter(fromstr.substr(i + 1, string::npos), ":", "::");
Modified: UDM/trunk/src/Udm/DiagramGen.cpp
==============================================================================
--- UDM/trunk/src/Udm/DiagramGen.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/Udm/DiagramGen.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -22,7 +22,7 @@
static string GetNsfromFromStr(const string& fromstr )
{
- unsigned int i = fromstr.find(':');
+ string::size_type i = fromstr.find(':');
if (i == string::npos)
return "";
return fromstr.substr(i +1, string::npos);
Modified: UDM/trunk/src/Udm/File2Code/File2Code.cpp
==============================================================================
--- UDM/trunk/src/Udm/File2Code/File2Code.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/Udm/File2Code/File2Code.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -241,7 +241,7 @@
std::string tmp1;
replace(tmp1, tmp, "\\n", "\\\\n");*/
- int b_eol = tmp1.find_last_not_of("\r\n");
+ std::string::size_type b_eol = tmp1.find_last_not_of("\r\n");
if (b_eol != std::string::npos)
tmp1.erase(b_eol + 1);
if (!tmp1.empty() && (tmp1.at(0) == '\r' || tmp1.at(0) == '\n'))
Modified: UDM/trunk/src/UdmBase/DTDGen.cpp
==============================================================================
--- UDM/trunk/src/UdmBase/DTDGen.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/UdmBase/DTDGen.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -691,7 +691,7 @@
void AddUMLContainerNameToURIMapping(const char *optp, map<string, string> &ns_map)
{
string opt(optp);
- int loc = opt.find('=');
+ string::size_type loc = opt.find('=');
if (loc != string::npos) {
string uml_ns_path = opt.substr(0, loc);
string uri = opt.substr(loc + 1);
Modified: UDM/trunk/src/UdmBase/UdmBase.cpp
==============================================================================
--- UDM/trunk/src/UdmBase/UdmBase.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/UdmBase/UdmBase.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -1328,7 +1328,7 @@
UDM_DLL DataNetwork *DataNetwork::CreateBackend(string bid, const UdmDiagram &metainfo, UdmProject* project)
{
backendtabt *p = backendtab;
- unsigned int l;
+ string::size_type l;
/*l = bid.find(':');
if(l >= 3) {
bid.erase(l);
Modified: UDM/trunk/src/UdmGme/UdmGme.cpp
==============================================================================
--- UDM/trunk/src/UdmGme/UdmGme.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/UdmGme/UdmGme.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -399,7 +399,7 @@
{
RpHelperIDs ret;
- int begin, end;
+ string::size_type begin, end;
begin = src.find_first_not_of(' ');
if (begin != string::npos)
{
@@ -2324,7 +2324,7 @@
return ret;
};
- int newpos, prevpos = 0;
+ string::size_type newpos, prevpos = 0;
while ((newpos = input.find(';', prevpos)) != string::npos)
@@ -2332,7 +2332,7 @@
string posstring = input.substr(prevpos, newpos-prevpos);
prevpos = newpos + 1;
- int asppos = posstring.find('(', 0);
+ string::size_type asppos = posstring.find('(', 0);
string asp = posstring.substr(0, asppos);//the name of the aspect
string position = posstring.substr(asppos);//the two coordinates
Modified: UDM/trunk/src/UdmOcl/UdmOcl.cpp
==============================================================================
--- UDM/trunk/src/UdmOcl/UdmOcl.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/UdmOcl/UdmOcl.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -74,8 +74,8 @@
void inReplace( std::string& str, const std::string& str1, const std::string& str2 )
{
- int iPos = 0;
- int iPosFrom = 0;
+ std::string::size_type iPos = 0;
+ std::string::size_type iPosFrom = 0;
while ( ( iPos = str.find( str1, iPosFrom ) ) != std::string::npos ) {
str = str.substr( iPosFrom, iPos ) + str2 + str.substr( iPos + str1.length() );
iPosFrom = iPos + str1.length();
Modified: UDM/trunk/src/UdmOcl/UdmOclType.cpp
==============================================================================
--- UDM/trunk/src/UdmOcl/UdmOclType.cpp Fri Feb 18 14:07:25 2011 (r3644)
+++ UDM/trunk/src/UdmOcl/UdmOclType.cpp Fri Feb 18 14:17:06 2011 (r3645)
@@ -632,8 +632,8 @@
if (bIsQualified)
{
- unsigned int loc1 = strName.find("::");
- unsigned int loc2 = strName.rfind("::");
+ std::string::size_type loc1 = strName.find("::");
+ std::string::size_type loc2 = strName.rfind("::");
if (loc1 != loc2)
{
strDgrName = strName.substr(0, loc1);
More information about the Mobies-commit
mailing list