Diverse kaputte Casts repariert.
Unwirksame und ueberfluessige Casts entfernt,
etwas Code-Cleanup.
Change-Id: I92f01e6391c432cd0881a5faac580f6d0b40c323
diff --git a/std/living/life.c b/std/living/life.c
index d868cdd..7feb2c2 100644
--- a/std/living/life.c
+++ b/std/living/life.c
@@ -17,7 +17,7 @@
// P_POISON -- level of poison
// P_CORPSE -- corpse-object
// P_DEAF -- if living is deaf
-#pragma strong_types,save_types,rtt_checks
+#pragma strict_types,save_types,rtt_checks
#pragma range_check
#pragma no_clone
@@ -232,7 +232,7 @@
if ( QueryProp(P_XP) && objectp(enemy) )
{
if ( !QueryProp(P_NO_XP) )
- enemy->AddExp(dam*(int)QueryProp(P_TOTAL_WC)/10);
+ enemy->AddExp(dam*({int})QueryProp(P_TOTAL_WC)/10);
}
if (living(enemy)) {
@@ -516,7 +516,7 @@
// NPC_Killed_By() rufen.
if ( !query_once_interactive(ME) )
{
- object killer = ((object) QueryProp(P_KILLER)) || previous_object() ||
+ object killer = (({object}) QueryProp(P_KILLER)) || previous_object() ||
this_interactive() || this_player();
if ( killer && query_once_interactive(killer) )
diff --git a/std/living/moving.c b/std/living/moving.c
index b05262c..78a1cf5 100644
--- a/std/living/moving.c
+++ b/std/living/moving.c
@@ -3,7 +3,7 @@
// living/moving.c -- moving of living objects
//
// $Id: moving.c 9448 2016-01-22 17:52:28Z Zesstra $
-#pragma strong_types
+#pragma strict_types
#pragma save_types
#pragma range_check
#pragma no_clone
@@ -224,7 +224,7 @@
|| ((file_size(fn+".c")>0 ||
(file_size(vc=implode(explode(fn,"/")[0..<2],"/")+
"/virtual_compiler.c")>0 &&
- !catch(tmp=(int)call_other(vc,"QueryValidObject",fn);
+ !catch(tmp=({int})call_other(vc,"QueryValidObject",fn);
publish) && tmp>0)) &&
!catch(load_object(fn);publish) )) &&
(!interactive(ME) || !fn->QueryProp(P_NO_PLAYERS) ||
@@ -301,13 +301,13 @@
string *mout;
if ( !textout ){
if ( method & M_TPORT )
- textout = (string) QueryProp(P_MMSGOUT) ||
- (string) QueryProp(P_MSGOUT);
+ textout = ({string}) QueryProp(P_MMSGOUT) ||
+ ({string}) QueryProp(P_MSGOUT);
else
- textout = (mout = explode( (string)
+ textout = (mout = explode( ({string})
QueryProp(P_MSGOUT) || "",
"#" ))[0]
- || (string)QueryProp(P_MMSGOUT);
+ || ({string})QueryProp(P_MMSGOUT);
}
if ( !sizeof(direction) )
@@ -378,9 +378,9 @@
if ( !(method & M_SILENT) ) {
if ( !textin ) {
if ( method & M_TPORT )
- textin = (string) QueryProp(P_MMSGIN);
+ textin = ({string}) QueryProp(P_MMSGIN);
else
- textin = (string) QueryProp(P_MSGIN);
+ textin = ({string}) QueryProp(P_MSGIN);
}
inv = all_inventory(environment()) - ({ this_object() });