Changeset 1280
- Timestamp:
- 09/10/23 01:51:57 (15 months ago)
- Location:
- cpp
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/nonstd_math.cpp
r1275 r1280 89 89 90 90 namespace fpExcept 91 { //shared for all platform , using crossplatform constants, can be defined in build_config (but also conditionally changed from the code)91 { //shared for all platforms, using crossplatform constants, can be defined in build_config (but also conditionally changed from the code) 92 92 int wanted_exceptions = 93 93 #ifdef WANTED_FP_EXCEPTIONS -
cpp/frams/genetics/f9/f9_conv.cpp
r1157 r1280 92 92 int GenoConv_f90::findVertexAt(vector<XYZ_LOC> &vertices, const XYZ_LOC &vertex) 93 93 { 94 for ( size_t i = 0; i < vertices.size(); i++)94 for (int i = 0; i < vertices.size(); i++) 95 95 if (vertices[i].same_coordinates(vertex)) return i; 96 96 return -1; -
cpp/frams/genetics/fF/fF_oper.cpp
r1130 r1280 49 49 par.load(gene); 50 50 static const int propsToMutate[] = fF_PROPS_TO_MUTATE; 51 int which = rndUint( std::size(propsToMutate));51 int which = rndUint((unsigned int)std::size(propsToMutate)); 52 52 bool mutated_ok = GenoOperators::mutatePropertyNaive(par.param, propsToMutate[which]); 53 53 if (mutated_ok) -
cpp/frams/genetics/fL/fL_general.cpp
r1273 r1280 555 555 //branch->processDefinition(this); 556 556 557 builtincount = words.size();557 builtincount = (int)words.size(); 558 558 } 559 559 … … 1383 1383 int fL_Builder::countDefinedWords() 1384 1384 { 1385 return words.size() - builtincount;1385 return (int)words.size() - builtincount; 1386 1386 } 1387 1387 1388 1388 int fL_Builder::countWordsInLSystem() 1389 1389 { 1390 int count = genotype.size();1390 size_t count = genotype.size(); 1391 1391 for (fL_Rule *rul : rules) 1392 1392 { … … 1394 1394 } 1395 1395 count += words.size(); 1396 return count;1396 return int(count); 1397 1397 } 1398 1398 -
cpp/frams/model/autoname.cpp
r1130 r1280 59 59 static void przeplatanka(char *out, char *in1, char *in2) 60 60 { 61 int d1 = strlen(in1), d2 =strlen(in2);61 int d1 = (int)strlen(in1), d2 = (int)strlen(in2); 62 62 int p1 = 0, p2 = 0; 63 63 int pp = d1 + d2; -
cpp/frams/model/model.cpp
r1215 r1280 610 610 int Model::getCheckpointCount() 611 611 { 612 return checkpoints.size();612 return (int)checkpoints.size(); 613 613 } 614 614 -
cpp/frams/model/modelparts.h
r1122 r1280 229 229 SString name, longname, description; 230 230 ParamEntry *props; 231 bool ownedprops; //< destructor will free props using ParamObject::freeParamTab231 bool ownedprops; //< destructor will free props using ParamObject::freeParamTab 232 232 paInt prefinputs, prefoutput; 233 233 paInt preflocation; … … 304 304 return vectordata; 305 305 } 306 void setSymbolGlyph(int *data, bool owned = 1)306 void setSymbolGlyph(int *data, bool owned = true) 307 307 { 308 308 if (vectordata && ownedvectordata) delete[]vectordata; 309 vectordata = data; ownedvectordata = owned; 309 vectordata = data; 310 ownedvectordata = owned; 310 311 } 311 312 /** additional information about how the neuron should be drawn -
cpp/frams/model/similarity/simil-match.cpp
r1044 r1280 69 69 70 70 // return the result 71 return m_apvMatched[Obj]->size();71 return (int)m_apvMatched[Obj]->size(); 72 72 } 73 73 -
cpp/frams/util/sstring-simple.cpp
r1130 r1280 78 78 void SString::endWrite(int newlength) 79 79 { 80 if (newlength < 0) newlength = strlen(txt);80 if (newlength < 0) newlength = (int)strlen(txt); 81 81 else 82 82 { … … 95 95 void SString::endAppend(int newappend) 96 96 { 97 if (newappend < 0) endWrite(appending + strlen(txt + appending));97 if (newappend < 0) endWrite(appending + (int)strlen(txt + appending)); 98 98 else endWrite(newappend + appending); 99 99 } … … 104 104 { 105 105 if (!s) return; 106 int x = strlen(s);106 int x = (int)strlen(s); 107 107 if (!x) return; 108 108 append(s, x); … … 137 137 { 138 138 if (!ch) chlen = 0; 139 else if (chlen < 0) chlen = strlen(ch);139 else if (chlen < 0) chlen = (int)strlen(ch); 140 140 if (chlen) 141 141 {
Note: See TracChangeset
for help on using the changeset viewer.