diff options
author | George Hazan <ghazan@miranda.im> | 2017-01-17 17:19:19 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-01-17 17:19:19 +0300 |
commit | b327ed7872ca83c3a4249039ba1a3d8dd3ece630 (patch) | |
tree | 5a4ae83dafab23f7832186b5dd0736611998f43c /plugins/HistoryPlusPlus | |
parent | fd7566b5de6b59bb18ff380cb1fa3f3f1089b70b (diff) |
useless field DBEVENTINFO::cbSize removed
Diffstat (limited to 'plugins/HistoryPlusPlus')
-rw-r--r-- | plugins/HistoryPlusPlus/HistoryForm.pas | 6 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_events.pas | 3 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_externalgrid.pas | 9 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_sessionsthread.pas | 1 |
4 files changed, 7 insertions, 12 deletions
diff --git a/plugins/HistoryPlusPlus/HistoryForm.pas b/plugins/HistoryPlusPlus/HistoryForm.pas index ba0337d818..eed0d360f1 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.pas +++ b/plugins/HistoryPlusPlus/HistoryForm.pas @@ -3917,13 +3917,13 @@ begin begin
DBEventInfo := GetEventInfo(hDBEvent);
DBEventInfo.szModule := nil;
- Item.Size := Cardinal(DBEventInfo.cbSize) + Cardinal(DBEventInfo.cbBlob);
+ Item.Size := sizeof(DBEventInfo) + Cardinal(DBEventInfo.cbBlob);
end;
if Item.Size > 0 then
begin
GetMem(Item.Buffer, Item.Size);
- DataOffset := PAnsiChar(Item.Buffer) + DBEventInfo.cbSize;
- Move(DBEventInfo, Item.Buffer^, DBEventInfo.cbSize);
+ DataOffset := PAnsiChar(Item.Buffer) + sizeof(DBEventInfo);
+ Move(DBEventInfo, Item.Buffer^, sizeof(DBEventInfo));
Move(DBEventInfo.pBlob^, DataOffset^, DBEventInfo.cbBlob);
end;
end
diff --git a/plugins/HistoryPlusPlus/hpp_events.pas b/plugins/HistoryPlusPlus/hpp_events.pas index f3493adf03..84e21102f4 100644 --- a/plugins/HistoryPlusPlus/hpp_events.pas +++ b/plugins/HistoryPlusPlus/hpp_events.pas @@ -251,7 +251,6 @@ begin if RecentEvent <> hDBEvent then
begin
ZeroMemory(@RecentEventInfo, SizeOf(RecentEventInfo));
- RecentEventInfo.cbSize := SizeOf(RecentEventInfo);
RecentEventInfo.cbBlob := 0;
db_event_get(hDBEvent, @RecentEventInfo);
RecentEvent := hDBEvent;
@@ -266,7 +265,6 @@ begin if RecentEvent <> hDBEvent then
begin
ZeroMemory(@RecentEventInfo, SizeOf(RecentEventInfo));
- RecentEventInfo.cbSize := SizeOf(RecentEventInfo);
RecentEventInfo.cbBlob := 0;
db_event_get(hDBEvent, @RecentEventInfo);
RecentEvent := hDBEvent;
@@ -428,7 +426,6 @@ var BlobSize: integer;
begin
ZeroMemory(@Result, SizeOf(Result));
- Result.cbSize := SizeOf(Result);
BlobSize := db_event_getBlobSize(hDBEvent);
if BlobSize > 0 then
begin
diff --git a/plugins/HistoryPlusPlus/hpp_externalgrid.pas b/plugins/HistoryPlusPlus/hpp_externalgrid.pas index 2bf5dd6c8c..e0a5f3ea53 100644 --- a/plugins/HistoryPlusPlus/hpp_externalgrid.pas +++ b/plugins/HistoryPlusPlus/hpp_externalgrid.pas @@ -1246,7 +1246,6 @@ begin if Items[Index].Custom then
begin
ZeroMemory(@DBEventInfo, SizeOf(DBEventInfo));
- DBEventInfo.cbSize := SizeOf(DBEventInfo);
DBEventInfo.timestamp := Items[Index].CustomEvent.Time;
DBEventInfo.flags := DBEF_READ or DBEF_UTF;
if Items[Index].CustomEvent.Sent then
@@ -1255,7 +1254,7 @@ begin TextUTF := UTF8Encode(Items[Index].CustomEvent.Text) + #0;
DBEventInfo.cbBlob := Length(TextUTF) + 1;
DBEventInfo.pBlob := Pointer(PAnsiChar(TextUTF));
- Item.Size := Cardinal(DBEventInfo.cbSize) + Cardinal(DBEventInfo.cbBlob);
+ Item.Size := sizeof(DBEventInfo) + Cardinal(DBEventInfo.cbBlob);
end
else
begin
@@ -1264,14 +1263,14 @@ begin begin
DBEventInfo := GetEventInfo(hDBEvent);
DBEventInfo.szModule := nil;
- Item.Size := Cardinal(DBEventInfo.cbSize) + Cardinal(DBEventInfo.cbBlob);
+ Item.Size := sizeof(DBEventInfo) + Cardinal(DBEventInfo.cbBlob);
end;
end;
if Item.Size > 0 then
begin
GetMem(Item.Buffer, Item.Size);
- DataOffset := PAnsiChar(Item.Buffer) + DBEventInfo.cbSize;
- Move(DBEventInfo, Item.Buffer^, DBEventInfo.cbSize);
+ DataOffset := PAnsiChar(Item.Buffer) + sizeof(DBEventInfo);
+ Move(DBEventInfo, Item.Buffer^, sizeof(DBEventInfo));
Move(DBEventInfo.pBlob^, DataOffset^, DBEventInfo.cbBlob);
end;
end
diff --git a/plugins/HistoryPlusPlus/hpp_sessionsthread.pas b/plugins/HistoryPlusPlus/hpp_sessionsthread.pas index d86372feaf..b9a9109bf1 100644 --- a/plugins/HistoryPlusPlus/hpp_sessionsthread.pas +++ b/plugins/HistoryPlusPlus/hpp_sessionsthread.pas @@ -180,7 +180,6 @@ begin while (hDBEvent <> 0) and not Terminated do
begin
ZeroMemory(@Event, SizeOf(Event));
- Event.cbSize := SizeOf(Event);
Event.cbBlob := 0;
db_event_get(hDBEvent, @Event);
CurTime := Event.Timestamp;
|