From 77a1a0d2724d69406b8fa81cfb67b73d378ae415 Mon Sep 17 00:00:00 2001 From: Bing Xu Date: Mon, 17 Aug 2015 13:01:20 -0600 Subject: [PATCH] fix const --- include/dmlc/parameter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/dmlc/parameter.h b/include/dmlc/parameter.h index 9bb0ed3d94..b615c37b32 100644 --- a/include/dmlc/parameter.h +++ b/include/dmlc/parameter.h @@ -428,7 +428,7 @@ class FieldEntry // parent typedef FieldEntryNumeric, int> Parent; // override set - virtual void Set(void *head, const std::string &value) { + virtual void Set(void *head, const std::string &value) const { if (is_enum_) { std::map::const_iterator it = enum_map_.find(value); std::ostringstream os; @@ -477,7 +477,7 @@ class FieldEntry // parent class typedef FieldEntryBase, std::string> Parent; // override set - virtual void Set(void *head, const std::string &value) { + virtual void Set(void *head, const std::string &value) const { this->Get(head) = value; this->Check(head); }