mirror of
https://git.vladimir.cc/vladimir/ewsdr.git
synced 2026-08-25 20:37:33 +00:00
fix macOS build
This commit is contained in:
+6
-3
@@ -8,7 +8,7 @@ unit ChannelStore;
|
||||
interface
|
||||
|
||||
uses
|
||||
SysUtils, Classes, Math, fpJSON, jsonparser, jsonscanner;
|
||||
SysUtils, Classes, Math, fpJSON, jsonparser, jsonscanner, PlatformUtils;
|
||||
|
||||
const
|
||||
CHANNELS_FILE = 'channels.json';
|
||||
@@ -36,7 +36,7 @@ type
|
||||
function JB(O: TJSONObject; const K: string; Def: Boolean): Boolean;
|
||||
function JS(O: TJSONObject; const K: string; const Def: string): string;
|
||||
public
|
||||
constructor Create(const AFilePath: string = CHANNELS_FILE);
|
||||
constructor Create(const AFilePath: string = '');
|
||||
procedure Load;
|
||||
procedure Save;
|
||||
function Count: Integer;
|
||||
@@ -69,7 +69,10 @@ end;
|
||||
constructor TChannelStore.Create(const AFilePath: string);
|
||||
begin
|
||||
inherited Create;
|
||||
FFilePath := AFilePath;
|
||||
if AFilePath = '' then
|
||||
FFilePath := GetAppCfgDir + CHANNELS_FILE
|
||||
else
|
||||
FFilePath := AFilePath;
|
||||
SetLength(FChannels, 0);
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user