diff options
author | John Langford <jl@nyclamp.(none)> | 2014-01-08 20:04:26 +0400 |
---|---|---|
committer | John Langford <jl@nyclamp.(none)> | 2014-01-08 20:04:26 +0400 |
commit | 9be3f55aa15c22b8279e801f7a69eeba1ba2644b (patch) | |
tree | 0c7676eb3718e0d34f9b6ad99c849eb0e15b166f /vowpalwabbit/csoaa.cc | |
parent | 18c929e512dd809f57ff4250219e61d07a2d9699 (diff) |
more void* removal
Diffstat (limited to 'vowpalwabbit/csoaa.cc')
-rw-r--r-- | vowpalwabbit/csoaa.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/vowpalwabbit/csoaa.cc b/vowpalwabbit/csoaa.cc index 2a22ef44..a79883ae 100644 --- a/vowpalwabbit/csoaa.cc +++ b/vowpalwabbit/csoaa.cc @@ -357,7 +357,7 @@ namespace CSOAA { ec->final_prediction = (float)prediction; } - void finish_example(vw& all, void*, example* ec) + void finish_example(vw& all, csoaa*, example* ec) { output_example(all, ec); VW::finish_example(all, ec); @@ -387,7 +387,7 @@ namespace CSOAA { all.sd->k = nb_actions; learner* l = new learner(c, predict_or_learn<true>, predict_or_learn<false>, all.l, nb_actions); - l->set_finish_example(finish_example); + l->set_finish_example<csoaa,finish_example>(); return l; } @@ -1005,7 +1005,7 @@ namespace LabelDict { LabelDict::free_label_features(*l); } - void finish_example(vw& all, void*, example* ec) + void finish_example(vw& all, ldf*, example* ec) { if (! LabelDict::ec_is_label_definition(ec)) { all.sd->weighted_examples += 1; @@ -1016,9 +1016,8 @@ namespace LabelDict { VW::finish_example(all, ec); } - void finish_multiline_example(vw& all, void* data, example* ec) + void finish_multiline_example(vw& all, ldf* l, example* ec) { - ldf* l=(ldf*)data; if (l->need_to_clear) { if (l->ec_seq.size() > 0) output_example_seq(all, *l); @@ -1110,9 +1109,9 @@ namespace LabelDict { ld->need_to_clear = false; learner* l = new learner(ld, predict_or_learn<true>, predict_or_learn<false>, all.l); if (ld->is_singleline) - l->set_finish_example(finish_example); + l->set_finish_example<ldf,finish_example>(); else - l->set_finish_example(finish_multiline_example); + l->set_finish_example<ldf,finish_multiline_example>(); l->set_finish<ldf,finish>(); l->set_end_examples<ldf,end_examples>(); l->set_end_pass<ldf,end_pass>(); |