Commit ca6bced2 authored by Christophe Gonzales's avatar Christophe Gonzales

trying to remove error C2440 from mvsc compilation

parent cee44955
Pipeline #20247112 failed with stages
in 9 minutes and 2 seconds
......@@ -51,8 +51,8 @@ namespace gum {
__modalities.resize ( nb_vars );
const auto domainSizes = __database.domainSizes ();
for ( std::size_t i = 0; i < nb_vars; ++i ) {
__name2nodeId.insert ( var_names[i], i );
__modalities[i] = domainSizes[i];
__name2nodeId.insert ( var_names[i], NodeId(i) );
__modalities[i] = Size( domainSizes[i] );
}
// create the parser
......
......@@ -121,10 +121,6 @@ namespace gum {
__variable.addTick ( tick );
}
// the the bounds of the discretized variable
const float lower_bound = ticks[0];
const float upper_bound = ticks.back ();
// add the content of the variable into the back dictionary
std::size_t size = 0;
for ( const auto& label : var.labels() ) {
......@@ -249,7 +245,7 @@ namespace gum {
const std::string& str ) {
// try to get the index of str within the discretized variable.
try {
return DBTranslatedValue { __variable[str] };
return DBTranslatedValue { std::size_t(__variable[str]) };
}
catch ( gum::Exception& ) {
// check for a missing symbol
......
......@@ -245,7 +245,7 @@ namespace gum {
// Finally, if this is still not a missing value and, if enabled, try
// to add str as a new label
try {
return DBTranslatedValue { __variable[str] };
return DBTranslatedValue { std::size_t(__variable[str]) };
}
catch ( gum::Exception& ) {
// check that this is not a missing value
......
......@@ -452,7 +452,7 @@ namespace gum {
}
__variable.setMaxVal ( new_value );
return DBTranslatedValue { size - 1 };
return DBTranslatedValue { size - std::size_t(1) };
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment