X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/6a24f530fab7ebff1617f6d3929d2fcad7ed4818..0907aa4037b12b6b88ee24495d4577a064d4f8db:/projects/sgconf/utils.h diff --git a/projects/sgconf/utils.h b/projects/sgconf/utils.h index 3793c9cd..6168cbf2 100644 --- a/projects/sgconf/utils.h +++ b/projects/sgconf/utils.h @@ -1,8 +1,7 @@ -#ifndef __STG_SGCONF_UTILS_H__ -#define __STG_SGCONF_UTILS_H__ +#pragma once #include "stg/common.h" -#include "stg/resetable.h" +#include "stg/optional.h" #include #include @@ -12,7 +11,7 @@ namespace SGCONF template inline -void MaybeSet(const std::map & options, const std::string & name, RESETABLE & res) +void MaybeSet(const std::map & options, const std::string & name, STG::Optional & res) { std::map::const_iterator it(options.find(name)); if (it == options.end()) @@ -35,7 +34,7 @@ conv(it->second, res); template <> inline -void MaybeSet(const std::map & options, const std::string & name, RESETABLE & res) +void MaybeSet(const std::map & options, const std::string & name, STG::Optional & res) { std::map::const_iterator it(options.find(name)); if (it == options.end()) @@ -44,5 +43,3 @@ res = it->second; } } // namespace SGCONF - -#endif