Skip to content

Commit

Permalink
compare type_index instead of filename
Browse files Browse the repository at this point in the history
  • Loading branch information
Hephaestus12 committed Mar 24, 2020
1 parent 72cb514 commit 99a0f1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shogun/util/factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ namespace shogun
require(file, "No file provided.");
std::shared_ptr<Features> result = nullptr;

if(strcmp( file->get_name(), "LibSVMFile") == 0)
if(std::type_index(typeid(*file)) == std::type_index(typeid(LibSVMFile)))
{
switch (primitive_type)
{
Expand Down

0 comments on commit 99a0f1e

Please sign in to comment.