@@ -152,8 +152,8 @@ int Companion::cmdPlugin(int argc, char *argv[])
152
152
for (size_t i=0 ; i<lst.size (); i++) {
153
153
Value& options = lst.get (i);
154
154
std::string name = options.asList ()->get (0 ).toString ();
155
- std::string path = options.check (" path" , Value (" unknown path" )).asString ();
156
- std::string type = options.check (" type" , Value (" unknown type" )).asString ();
155
+ std::string path = options.asSearchable ()-> check (" path" , Value (" unknown path" )).asString ();
156
+ std::string type = options.asSearchable ()-> check (" type" , Value (" unknown type" )).asString ();
157
157
if (type == " shared" ) {
158
158
yCInfo (COMPANION, " %15s:\t %s" , name.c_str (), path.c_str ());
159
159
}
@@ -165,7 +165,7 @@ int Companion::cmdPlugin(int argc, char *argv[])
165
165
Bottle lst = selector.getSelectedPlugins ();
166
166
for (size_t i=0 ; i<lst.size (); i++) {
167
167
Value& options = lst.get (i);
168
- std::string name = options.check (" name" , Value (" untitled" )).asString ();
168
+ std::string name = options.asSearchable ()-> check (" name" , Value (" untitled" )).asString ();
169
169
yCInfo (COMPANION, " %s" , name.c_str ());
170
170
}
171
171
return 0 ;
@@ -180,11 +180,11 @@ int Companion::cmdPlugin(int argc, char *argv[])
180
180
bool ok = true ;
181
181
for (size_t i=0 ; i<lst.size (); i++) {
182
182
Value& options = lst.get (i);
183
- std::string name = options.check (" name" , Value (" untitled" )).asString ();
184
- std::string type = options.check (" type" , Value (" unknown type" )).asString ();
183
+ std::string name = options.asSearchable ()-> check (" name" , Value (" untitled" )).asString ();
184
+ std::string type = options.asSearchable ()-> check (" type" , Value (" unknown type" )).asString ();
185
185
yCInfo (COMPANION);
186
186
yCInfo (COMPANION, " %s %s" , type.c_str (), name.c_str ());
187
- yCInfo (COMPANION, " * ini file: %s" , options.find (" inifile" ).toString ().c_str ());
187
+ yCInfo (COMPANION, " * ini file: %s" , options.asSearchable ()-> find (" inifile" ).toString ().c_str ());
188
188
options.asList ()->pop ();
189
189
yCInfo (COMPANION, " * config: %s" , options.toString ().c_str ());
190
190
YarpPluginSettings settings;
@@ -195,7 +195,7 @@ YARP_DISABLE_DEPRECATED_WARNING
195
195
YARP_WARNING_POP
196
196
#endif // YARP_NO_DEPRECATED
197
197
settings.setSelector (selector);
198
- settings.readFromSearchable (options, name);
198
+ settings.readFromSearchable (* options. asSearchable () , name);
199
199
ok &= plugin_test (settings);
200
200
}
201
201
return ok ? 0 : 1 ;
0 commit comments