mirror of
https://github.com/scp-fs2open/fs2open.github.com.git
synced 2026-11-09 13:01:29 -10:00
20 lines
502 B
C++
20 lines
502 B
C++
#include "parsehi.h"
|
|
#include "parselo.h"
|
|
|
|
/**
|
|
* @brief Parses an optional table value into a field if the name is found
|
|
*
|
|
* @param field_name The name of the table field
|
|
* @param value_target Pointer to the variable to assign any parsed value to
|
|
*
|
|
* @return True if a value was parsed, false if not
|
|
*/
|
|
bool parse_optional_float_into(const SCP_string& field_name, float* value_target)
|
|
{
|
|
if (optional_string(field_name.c_str())) {
|
|
stuff_float(value_target);
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|