Skip to content

Commit

Permalink
Change make_any_ref_array to make_any_ref
Browse files Browse the repository at this point in the history
Use overloading rather than new names
  • Loading branch information
karlnapf committed Jan 23, 2018
1 parent 14c1484 commit 6e5f488
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/shogun/base/SGObject.h
Expand Up @@ -523,7 +523,7 @@ class CSGObject
{
BaseTag tag(name);
create_parameter(
tag, AnyParameter(make_any_ref_array(value, len), properties));
tag, AnyParameter(make_any_ref(value, len), properties));
}

public:
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/lib/any.h
Expand Up @@ -799,7 +799,7 @@ namespace shogun
}

template <typename T, typename S>
inline Any make_any_ref_array(T** ptr, S* length)
inline Any make_any_ref(T** ptr, S* length)
{
return make_any(ArrayReference<T, S>(ptr, length));
}
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/lib/Any_unittest.cc
Expand Up @@ -391,9 +391,9 @@ TEST(Any, array_ref)
float* other = new float[other_len];
std::iota(other, other + other_len, 9);

auto any_src = make_any_ref_array(&src, &src_len);
auto any_dst = make_any_ref_array(&dst, &dst_len);
auto any_other = make_any_ref_array(&other, &other_len);
auto any_src = make_any_ref(&src, &src_len);
auto any_dst = make_any_ref(&dst, &dst_len);
auto any_other = make_any_ref(&other, &other_len);

EXPECT_EQ(any_src, any_src);
EXPECT_EQ(any_dst, any_dst);
Expand Down

0 comments on commit 6e5f488

Please sign in to comment.