forked from github/server
- Logging an error when a ship is moved to an illegal coast. - Removing a const-cast warning from call to translate()
This commit is contained in:
parent
3b329d952f
commit
fa0114b64c
|
@ -45,6 +45,7 @@
|
|||
|
||||
/* util includes */
|
||||
#include <util/goodies.h>
|
||||
#include <util/base36.h>
|
||||
#include <util/language.h>
|
||||
#include <util/rand.h>
|
||||
|
||||
|
@ -550,6 +551,17 @@ move_ship(ship * sh, region * from, region * to, region_list * route)
|
|||
}
|
||||
if (*iunit==u) iunit=&u->next;
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
if (rterrain(sh->region)!=T_OCEAN) {
|
||||
region * rcoast = rconnect(sh->region, sh->coast);
|
||||
if (rterrain(rcoast)!=T_OCEAN) {
|
||||
log_error(("ship %s sailed into a coast with no ocean neighbours.\n",
|
||||
shipid(sh)));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return sh;
|
||||
}
|
||||
|
||||
|
|
|
@ -335,7 +335,7 @@ parse(opstack ** stack, const char* inn, const void * userdata)
|
|||
}
|
||||
|
||||
const char *
|
||||
translate(const char* format, const void * userdata, const char* vars, const void* args[])
|
||||
translate(const char* format, const void * userdata, const char* vars, void* args[])
|
||||
{
|
||||
int i = 0;
|
||||
const char *ic = vars;
|
||||
|
|
|
@ -25,7 +25,7 @@ extern void opstack_push(struct opstack ** stack, void * data);
|
|||
extern void translation_init(void);
|
||||
extern void translation_done(void);
|
||||
extern const char * translate_va(const char* format, const void * userdata, const char* vars, ...);
|
||||
extern const char * translate(const char* format, const void * userdata, const char* vars, const void* args[]);
|
||||
extern const char * translate(const char* format, const void * userdata, const char* vars, void* args[]);
|
||||
|
||||
/* eval_x functions */
|
||||
typedef void (*evalfun)(struct opstack ** stack, const void *);
|
||||
|
|
Loading…
Reference in New Issue