std::vector<std::string> aNames;
std::vector<int> aMinutes, aHours, aDays, aMonths, aYears;
aProp->GetModifications(aNames, aMinutes, aHours, aDays, aMonths, aYears);
- for (int i = 0, len = aNames.size(); i < len; i++) {
+ for (size_t i = 0, len = aNames.size(); i < len; i++) {
myUserName.push_back(aNames[i]);
myMinute.push_back(aMinutes[i]);
myHour.push_back(aHours[i]);
aProp->Init();
int i;
- for(i = 0; i < myUserName.size(); i++) {
+ for(i = 0; i < (int)myUserName.size(); i++) { //TODO: mismatch signed/unsigned
aProp->SetModification(myUserName[i],
myMinute[i], myHour[i],
myDay[i], myMonth[i], myYear[i]);
std::string units = GetUnits();
std::string comment = GetComment();
- int aLength1 = 0;
+ size_t aLength1 = 0;
std::map<std::string, std::string> versions;
versionMap::const_iterator it;
for (aLength1 = 0, it = myComponentVersions.begin(); it != myComponentVersions.end(); ++it ) {
(int)(aMonths[anIndex]),
(int)(aYears[anIndex]),
(char*)(aNames[anIndex].c_str()));
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
aProperty[a++] = 1;
}
//Write units if need
if(units.size() > 0) {
sprintf(&(aProperty[a]),"%s",units.c_str());
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
}
aProperty[a++] = 1; //delimiter of the units and comments
//Write comments if need
if(comment.size() > 0) {
sprintf(&(aProperty[a]),"%s",comment.c_str());
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
}
aProperty[a++] = 30; //delimiter of the component versions
sprintf(&(aProperty[a]),"%s=%s",
(char*)(versionsIt->first.c_str()),
(char*)(versionsIt->second.c_str()));
- a = strlen(aProperty);
+ a = (int)strlen(aProperty); //!< TODO: conversion from size_t to int
aProperty[a++] = 1;
}
// - yyyy: year = 4 bytes
// - name: user's name = arbitrary value, minimal length is 0 bytes
// - 1 : records delimiter = 1 byte
- for (anIndex = 2; anIndex + 13 < value.size() ;) {
+ for (anIndex = 2; anIndex + 13 < (int)value.size() ;) { //TODO: mismatch signed/unsigned
char str[10];
int aMinute, aHour, aDay, aMonth, aYear;
str[0] = aCopy[anIndex++];
anIndex += aNameSize + 1;
//Check end of the modifications section
- if(anIndex < value.size() && aCopy[anIndex] == 30)
+ if(anIndex < (int)value.size() && aCopy[anIndex] == 30) //TODO: mismatch signed/unsigned
break;
}
//Case when study contains units and comment properties
- if( anIndex < value.size() ) {
+ if( anIndex < (int)value.size() ) { //TODO: mismatch signed/unsigned
anIndex++; //skip the delimiter of the sections: char(30)
int unitsSize;
for(unitsSize = 0; aCopy[anIndex+unitsSize] != 1; unitsSize++);
}
//Case when study contains components versions
- if( anIndex < value.size() ) {
- while ( anIndex < value.size() && aCopy[anIndex] != 0 ) {
+ if( anIndex < (int)value.size() ) { //TODO: mismatch signed/unsigned
+ while ( anIndex < (int)value.size() && aCopy[anIndex] != 0 ) { //TODO: mismatch signed/unsigned
int modSize;
for(modSize = 0; aCopy[anIndex+modSize] != '='; modSize++);
int verSize;
aVersions[verSize] = 0;
std::string mVersions = aVersions;
- int start = 0, idx = mVersions.find( ';', start );
+ size_t start = 0, idx = mVersions.find( ';', start );
while ( idx != std::string::npos ) {
SetComponentVersion( aModule, mVersions.substr( start, idx-start ) );
start = idx + 1;