Make sure to capture floating point return values from lua
This commit is contained in:
		
							parent
							
								
									0352d9c99e
								
							
						
					
					
						commit
						94f44e1d5d
					
				| @ -532,7 +532,8 @@ int EdgeBasedGraphFactory::GetTurnPenalty(double angle, lua_State *lua_state) co | ||||
|         try | ||||
|         { | ||||
|             // call lua profile to compute turn penalty
 | ||||
|             return luabind::call_function<int>(lua_state, "turn_function", 180. - angle); | ||||
|             double penalty = luabind::call_function<double>(lua_state, "turn_function", 180. - angle); | ||||
|             return static_cast<int>(penalty); | ||||
|         } | ||||
|         catch (const luabind::error &er) | ||||
|         { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user