Skip to content

Commit 667c584

Browse files
author
Joachim Marder
committed
Fixed warnings: W1025 Unsupported language feature: 'class constructor'
1 parent 2d7964d commit 667c584

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Lib/UIRibbonCommands.pas

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ TUIRecentItem = class(TUICollectionItem)
11701170
{$REGION 'Images'}
11711171
TUIImage = class(TInterfacedObject, IUIImage)
11721172
{$REGION 'Internal Declarations'}
1173-
strict private
1173+
private
11741174
class var FImageFactory: IUIImageFromBitmap;
11751175
private
11761176
FHandle: IUIImage;
@@ -4034,12 +4034,6 @@ function TUIRecentItem.GetPropertyValue(const Prop: TUIProperty): TValue;
40344034
constructor TUIImage.Create(const ResourceId: Integer);
40354035
begin
40364036
inherited Create;
4037-
if (FImageFactory = nil) then
4038-
begin
4039-
if not Succeeded(CoCreateInstance(CLSID_UIRibbonImageFromBitmapFactory, nil,
4040-
CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IUnknown, FImageFactory)) then
4041-
FImageFactory := nil;
4042-
end;
40434037
Load(ResourceId);
40444038
end;
40454039

@@ -4327,6 +4321,9 @@ initialization
43274321
{$ENDIF}
43284322
Notifier := TNotifier.Create;
43294323
TUICommand.FProperties := TUICommandExecutionProperties.Create;
4324+
if not Succeeded(CoCreateInstance(CLSID_UIRibbonImageFromBitmapFactory, nil,
4325+
CLSCTX_INPROC_SERVER or CLSCTX_LOCAL_SERVER, IUnknown, TUIImage.FImageFactory)) then
4326+
TUIImage.FImageFactory := nil;
43304327

43314328
finalization
43324329
TUICommand.FProperties.Free;

0 commit comments

Comments
 (0)