-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
CheckLocked();
Backup();
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
myValue[Index-1] = Value;
CheckLocked();
Backup();
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
typedef std::vector<double>::iterator VI;
int i = 1;
int SALOMEDSImpl_AttributeSequenceOfReal::Length()
{
- return myValue.size();
+ return (int)myValue.size(); //!< TODO: conversion from size_t to int, possible loss of data
}
double SALOMEDSImpl_AttributeSequenceOfReal::Value(const int Index)
{
- if(Index <= 0 || Index > myValue.size()) throw DFexception("Out of range");
+ if(Index <= 0 || Index > (int)myValue.size()) throw DFexception("Out of range"); // TODO: mismatch signed/unsigned
return myValue[Index-1];
}
int aLength = Length();
char* aResult = new char[aLength * 127];
aResult[0] = 0;
- int aPosition = 0;
+ size_t aPosition = 0;
for (int i = 1; i <= aLength; i++) {
sprintf(aResult + aPosition , "%.64e ", Value(i));
aPosition += strlen(aResult + aPosition);