Skip to content
Snippets Groups Projects
Commit da270b2a authored by Olivier Dion's avatar Olivier Dion Committed by Adrien Béraud
Browse files

agent/utils: Add to_guile::operator int()

Change-Id: I12a30be4d77574f66bd6fc207cfee501bdb41bfa
parent cbcb6821
Branches
No related tags found
No related merge requests found
......@@ -116,6 +116,13 @@ struct from_guile
return scm_to_bool(value);
}
operator int()
{
AGENT_ASSERT(scm_is_integer(value), "Scheme value must be of type integer");
return scm_to_int(value);
}
operator std::string()
{
AGENT_ASSERT(scm_is_string(value), "Scheme value must be of type string");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment