Skip to content
This repository was archived by the owner on Aug 21, 2024. It is now read-only.

Commit eeeedce

Browse files
committed
fixes and cleanup
1 parent 887636f commit eeeedce

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

3rd_party/vcmi_fpjsonrtti.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ function TJSONDeStreamer.JSONToVariant(Data: TJSONData): Variant;
319319
ntFloat : Result:=Data.AsFloat;
320320
ntInteger : Result:=Data.AsInteger;
321321
ntInt64 : Result:=Data.Asint64;
322-
//ntQWord : Result:=Data.AsQWord;
322+
ntQWord : Result:=Data.AsQWord;
323323
end;
324324
jtString :
325325
Result:=Data.AsString;
@@ -528,7 +528,7 @@ procedure TJSONDeStreamer.DoRestoreProperty(AObject : TObject;PropInfo : PPropIn
528528
tkBool :
529529
SetOrdProp(AObject,PI,Ord(PropData.AsBoolean));
530530
tkQWord :
531-
SetOrdProp(AObject,PI,PropData.AsInt64);
531+
SetOrdProp(AObject,PI,PropData.AsQWord);
532532
tkObject,
533533
tkArray,
534534
tkRecord,
@@ -1163,7 +1163,7 @@ function TJSONStreamer.StreamProperty(Const AObject: TObject; PropertyInfo: PPro
11631163
tkInt64 :
11641164
Result:=TJSONInt64Number.Create(GetOrdProp(AObject,PropertyInfo));
11651165
tkQWord :
1166-
Result:=TJSONFloatNumber.Create(GetOrdProp(AObject,PropertyInfo));
1166+
Result:=TJSONQWordNumber.Create(GetOrdProp(AObject,PropertyInfo));
11671167
tkObject :
11681168
Result:=ObjectToJSON(GetObjectProp(AObject,PropertyInfo));
11691169
tkArray,

filesystem.pas

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,6 @@ procedure TFSManager.OnTopLevelDirectoryFound(FileIterator: TFileIterator);
803803

804804
if UpperCase(tld_name) <> 'MODS' then
805805
begin
806-
DebugLn('TLD :', p);
807806
srch.Search(p, '', False);
808807
end;
809808
finally
@@ -1380,7 +1379,7 @@ procedure TFSManager.OnFileFound(FileIterator: TFileIterator);
13801379

13811380
FResMap.Insert(res_id,res_loc);
13821381

1383-
DebugLn(rel_path, ' => ' , res_id.VFSPath, ' => ', FileIterator.FileName);
1382+
//DebugLn(rel_path, ' => ' , res_id.VFSPath, ' => ', FileIterator.FileName);
13841383
end;
13851384

13861385
procedure TFSManager.OnLodItemFound(Alod: TLod; constref AItem: TLodItem);
@@ -1530,7 +1529,7 @@ procedure TFSManager.ScanContentDir(const RelDir: string; ARootPath: TStrings);
15301529
begin
15311530
for root_path in ARootPath do
15321531
begin
1533-
DebugLn('ScanContentDir: ', root_path, ' ', RelDir);
1532+
//DebugLn('ScanContentDir: ', root_path, ' ', RelDir);
15341533
srch := TFileSearcher.Create;
15351534
//srch.OnFileFound := @OnFileFound;
15361535
srch.OnDirectoryFound:=@OnTopLevelDirectoryFound;

map.pas

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,11 +2362,12 @@ procedure TMapObject.SetSubtype(AValue: AnsiString);
23622362

23632363
if old_subtype=AValue then Exit;
23642364

2365-
Assert(Assigned(FMapObjectGroup));
2366-
23672365
NotifyReferenced(old_subtype,AValue);
23682366

2369-
FMapObjectType := FMapObjectGroup.Types.FindItem(AValue);
2367+
if Assigned(FMapObjectGroup) then
2368+
FMapObjectType := FMapObjectGroup.Types.FindItem(AValue)
2369+
else
2370+
FMapObjectType := nil;
23702371

23712372
RecreateOptions;
23722373
end;

0 commit comments

Comments
 (0)