fix on LP64 + gcc4 bool(pointer) => bool(pointer != NULL)
This commit is contained in:
parent
c5d2eafeb2
commit
7709de873d
21
games/ivan/patches/patch-FeLib_Include_save_h
Normal file
21
games/ivan/patches/patch-FeLib_Include_save_h
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-FeLib_Include_save_h,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- FeLib/Include/save.h.orig Mon Jun 7 16:39:39 2010
|
||||
+++ FeLib/Include/save.h Mon Jun 7 16:40:07 2010
|
||||
@@ -36,7 +36,7 @@ class outputfile
|
||||
void Put(char What) { fputc(What, Buffer); }
|
||||
void Write(const char* Offset, long Size)
|
||||
{ fwrite(Offset, 1, Size, Buffer); }
|
||||
- truth IsOpen() { return truth(Buffer); }
|
||||
+ truth IsOpen() { return truth(Buffer != NULL); }
|
||||
void Close() { fclose(Buffer); }
|
||||
void Flush() { fflush(Buffer); }
|
||||
void ReOpen();
|
||||
@@ -58,7 +58,7 @@ class inputfile
|
||||
rect ReadRect();
|
||||
int Get() { return fgetc(Buffer); }
|
||||
void Read(char* Offset, long Size) { fread(Offset, 1, Size, Buffer); }
|
||||
- truth IsOpen() { return truth(Buffer); }
|
||||
+ truth IsOpen() { return truth(Buffer != NULL); }
|
||||
truth Eof() { return feof(Buffer); }
|
||||
void ClearFlags() { clearerr(Buffer); }
|
||||
void SeekPosBegin(long Offset) { fseek(Buffer, Offset, SEEK_SET); }
|
12
games/ivan/patches/patch-Main_Include_char_h
Normal file
12
games/ivan/patches/patch-Main_Include_char_h
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Main_Include_char_h,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Include/char.h.orig Mon Jun 7 16:40:31 2010
|
||||
+++ Main/Include/char.h Mon Jun 7 16:40:37 2010
|
||||
@@ -991,7 +991,7 @@ class character : public entity, public id
|
||||
truth IsUsingWeaponOfCategory(int) const;
|
||||
virtual truth IsKamikazeDwarf() const { return false; }
|
||||
void AddRandomScienceName(festring&) const;
|
||||
- truth IsStuck() const { return truth(TrapData); }
|
||||
+ truth IsStuck() const { return truth(TrapData != NULL); }
|
||||
festring GetTrapDescription() const;
|
||||
truth TryToUnStickTraps(v2);
|
||||
void RemoveTrap(ulong);
|
12
games/ivan/patches/patch-Main_Include_human_h
Normal file
12
games/ivan/patches/patch-Main_Include_human_h
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Main_Include_human_h,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Include/human.h.orig Mon Jun 7 16:41:36 2010
|
||||
+++ Main/Include/human.h Mon Jun 7 16:41:42 2010
|
||||
@@ -130,7 +130,7 @@ CHARACTER(humanoid, character)
|
||||
virtual truth CheckIfEquipmentIsNotUsable(int) const;
|
||||
virtual void AddSpecialStethoscopeInfo(felist&) const;
|
||||
virtual item* GetPairEquipment(int) const;
|
||||
- virtual truth HasHead() const { return truth(GetHead()); }
|
||||
+ virtual truth HasHead() const { return truth(GetHead() != NULL); }
|
||||
virtual const festring& GetStandVerb() const;
|
||||
virtual head* Behead();
|
||||
virtual void AddAttributeInfo(festring&) const;
|
21
games/ivan/patches/patch-Main_Include_lsquare_h
Normal file
21
games/ivan/patches/patch-Main_Include_lsquare_h
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-Main_Include_lsquare_h,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Include/lsquare.h.orig Mon Jun 7 16:40:42 2010
|
||||
+++ Main/Include/lsquare.h Mon Jun 7 16:40:53 2010
|
||||
@@ -202,7 +202,7 @@ class lsquare : public square
|
||||
void PostProcessForBone(double&, int&);
|
||||
void DisplayEngravedInfo(festring&) const;
|
||||
truth EngravingsCanBeReadByPlayer();
|
||||
- truth HasEngravings() const { return truth(Engraved); }
|
||||
+ truth HasEngravings() const { return truth(Engraved != NULL); }
|
||||
void FinalProcessForBone();
|
||||
truth IsFreezed() const { return Flags & FREEZED; }
|
||||
truth IsDangerousToBreathe(const character*) const;
|
||||
@@ -237,7 +237,7 @@ class lsquare : public square
|
||||
void SendSunLightSignals();
|
||||
const sunemittervector& GetSunEmitter() const { return SunEmitter; }
|
||||
void ZeroReSunEmitatedFlags();
|
||||
- virtual truth HasBeenSeen() const { return truth(Memorized); }
|
||||
+ virtual truth HasBeenSeen() const { return truth(Memorized != NULL); }
|
||||
truth CalculateIsTransparent();
|
||||
void CalculateSunLightLuminance(ulong);
|
||||
void CreateMemorized();
|
12
games/ivan/patches/patch-Main_Include_stack_h
Normal file
12
games/ivan/patches/patch-Main_Include_stack_h
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Main_Include_stack_h,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Include/stack.h.orig Mon Jun 7 16:41:04 2010
|
||||
+++ Main/Include/stack.h Mon Jun 7 16:41:09 2010
|
||||
@@ -56,7 +56,7 @@ class stackiterator
|
||||
stackiterator(stackslot* Slot) : Slot(Slot) { }
|
||||
stackiterator& operator++() { Slot = Slot->Next; return *this; }
|
||||
stackiterator& operator--() { Slot = Slot->Last; return *this; }
|
||||
- truth HasItem() const { return truth(Slot); }
|
||||
+ truth HasItem() const { return truth(Slot != NULL); }
|
||||
item* operator->() const { return Slot->Item; }
|
||||
item* operator*() const { return Slot->Item; }
|
||||
const stackslot& GetSlot() const { return *Slot; }
|
12
games/ivan/patches/patch-Main_Source_command_cpp
Normal file
12
games/ivan/patches/patch-Main_Source_command_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Main_Source_command_cpp,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Source/command.cpp.orig Mon Jun 7 16:42:47 2010
|
||||
+++ Main/Source/command.cpp Mon Jun 7 16:42:53 2010
|
||||
@@ -1043,7 +1043,7 @@ truth commandsystem::Go(character* Char)
|
||||
Char->SetAction(Go);
|
||||
Char->EditAP(Char->GetStateAPGain(100)); // gum solution
|
||||
Char->GoOn(Go, true);
|
||||
- return truth(Char->GetAction());
|
||||
+ return truth(Char->GetAction() != NULL);
|
||||
}
|
||||
|
||||
truth commandsystem::ShowConfigScreen(character*)
|
12
games/ivan/patches/patch-Main_Source_fluid_cpp
Normal file
12
games/ivan/patches/patch-Main_Source_fluid_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Main_Source_fluid_cpp,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Source/fluid.cpp.orig Mon Jun 7 16:45:14 2010
|
||||
+++ Main/Source/fluid.cpp Mon Jun 7 16:45:21 2010
|
||||
@@ -598,7 +598,7 @@ void fluid::Redistribute()
|
||||
if(!UseImage())
|
||||
return;
|
||||
|
||||
- truth InitRandMap = truth(MotherItem);
|
||||
+ truth InitRandMap = truth(MotherItem != NULL);
|
||||
Image.Clear(InitRandMap);
|
||||
|
||||
if(GearImage)
|
12
games/ivan/patches/patch-Main_Source_lsquare_cpp
Normal file
12
games/ivan/patches/patch-Main_Source_lsquare_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Main_Source_lsquare_cpp,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Source/lsquare.cpp.orig Mon Jun 7 16:44:05 2010
|
||||
+++ Main/Source/lsquare.cpp Mon Jun 7 16:44:11 2010
|
||||
@@ -1585,7 +1585,7 @@ truth lsquare::Duplicate(const beamdata& Beam)
|
||||
character* Character = GetCharacter();
|
||||
|
||||
if(Character)
|
||||
- DuplicatedSomething = truth(Character->DuplicateToNearestSquare(Beam.Owner, Beam.SpecialParameters));
|
||||
+ DuplicatedSomething = truth(Character->DuplicateToNearestSquare(Beam.Owner, Beam.SpecialParameters) != NULL);
|
||||
|
||||
if(GetStack()->Duplicate(DuplicatedSomething ? 4 : 5, Beam.SpecialParameters))
|
||||
DuplicatedSomething = true;
|
12
games/ivan/patches/patch-Main_Source_lterras_cpp
Normal file
12
games/ivan/patches/patch-Main_Source_lterras_cpp
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Main_Source_lterras_cpp,v 1.1 2010/06/07 14:48:32 espie Exp $
|
||||
--- Main/Source/lterras.cpp.orig Mon Jun 7 16:44:05 2010
|
||||
+++ Main/Source/lterras.cpp Mon Jun 7 16:44:18 2010
|
||||
@@ -1193,7 +1193,7 @@ void door::BeDestroyed()
|
||||
|
||||
truth fountain::IsFountainWithWater() const
|
||||
{
|
||||
- return truth(GetSecondaryMaterial());
|
||||
+ return truth(GetSecondaryMaterial() != NULL);
|
||||
}
|
||||
|
||||
void liquidterrain::SurviveEffect(character* Survivor)
|
Loading…
x
Reference in New Issue
Block a user