Posted by blue_anna on Sat 4th Sep 02:14 (modification of post by blue_anna view diff)
View followups from blue_anna | diff | download | new post
- const monsters cmon = agent->as_monster();
- monsters* mon = &cmon;
- agent->as_monster()->hurt(this, initial_damage, flavour, cleanup_dead);
- DEPEND monster.d
- CXX monster.o
- monster.cc: In member function ‘virtual int monsters::hurt(const actor*, int, beam_type, bool)’:
- monster.cc:3488: error: conversion from ‘const monsters*’ to non-scalar type ‘const monsters’ requested
- monster.cc:3489: error: invalid conversion from ‘const monsters*’ to ‘monsters*’
- monster.cc:3490: error: passing ‘const monsters’ as ‘this’ argument of ‘virtual int monsters::hurt(const actor*, int, beam_type, bool)’ discards qualifiers
- monster.cc:3489: warning: unused variable ‘mon’
- make: *** [monster.o] Error 1
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.