Skip to content

Commit 95d560e

Browse files
authored
Merge pull request #3 from mhauskn/revert-2-master
Revert "Virtual functions with no code and non-void return: =0; silence compiler warning" Due to breakage of the main build process: /home/matthew/workspace/HFO/src/main_coach.cpp:43:13: error: cannot declare variable ‘{anonymous}::agent’ to be of abstract type ‘SampleCoach’ SampleCoach agent; ^ In file included from /home/matthew/workspace/HFO/src/main_coach.cpp:31:0: /home/matthew/workspace/HFO/src/sample_coach.h:41:7: note: because the following virtual functions are pure within ‘SampleCoach’: class SampleCoach ^ In file included from /home/matthew/workspace/HFO/build/librcsc-prefix/src/librcsc/rcsc/coach/coach_agent.h:38:0, from /home/matthew/workspace/HFO/src/sample_coach.h:30, from /home/matthew/workspace/HFO/src/main_coach.cpp:31: /home/matthew/workspace/HFO/build/librcsc-prefix/src/librcsc/rcsc/common/soccer_agent.h:141:10: note: virtual bool rcsc::SoccerAgent::handleMessageStep() bool handleMessageStep() = 0; ^ /home/matthew/workspace/HFO/build/librcsc-prefix/src/librcsc/rcsc/common/soccer_agent.h:164:10: note: virtual bool rcsc::SoccerAgent::handleTimeoutStep(int, int) bool handleTimeoutStep( const int timeout_count, ^ CMakeFiles/sample_coach.dir/build.make:62: recipe for target 'CMakeFiles/sample_coach.dir/src/main_coach.cpp.o' failed make[2]: *** [CMakeFiles/sample_coach.dir/src/main_coach.cpp.o] Error 1 CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/sample_coach.dir/all' failed make[1]: *** [CMakeFiles/sample_coach.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2
2 parents be6111f + c4143ab commit 95d560e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rcsc/common/soccer_agent.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ class SoccerAgent {
138138
void handleMessage() = 0;
139139

140140
virtual
141-
bool handleMessageStep() = 0;
141+
bool handleMessageStep()
142+
{ }
142143

143144
/*!
144145
\brief (virtual) handle offline client log message in offline client mode.
@@ -162,7 +163,8 @@ class SoccerAgent {
162163

163164
virtual
164165
bool handleTimeoutStep( const int timeout_count,
165-
const int waited_msec ) = 0;
166+
const int waited_msec )
167+
{ }
166168

167169
/*!
168170
\brief (pure virtual) handle exit event

0 commit comments

Comments
 (0)