Guest:
Register
|
Login
|
Member List
|
Search
|
Statistics
|
FAQ
Language
----------
Simplifed Chinese
Traditional Chinese
English
CnPack Forum
»
CnVCL 组件包
» HashMap 建议
‹‹ Last Thread
|
Next Thread ››
Poll
Trade
Reward
Activity
Printable Version
|
Email to Friend
|
Subscription
|
Favorites
Subject: HashMap 建议
wuyou
新警察
UID 10433
Digest Posts 0
Credits 11
Posts 4
点点分 11
Reading Access 10
Registered 2007-4-12
Status Offline
#1
Post at 2018-11-6 11:03
Profile
|
Blog
|
P.M.
HashMap 建议
建议将 FList: array of TCnHashMapRec;
移到 protected
使得继承的类可以输出 FList 列表,不需要每次都跑 GetNext,这不是线程安全的
TWgs = array of TWg;
function TWgMap.GetList: TWgs;
var
i,j: Integer;
begin
SetLength(Result, Size);
j := 0;
for I := Low(FList) to High(FList) do begin
if FList
.HashCode < 0 then Continue;
Result[j] := PWg(Pointer(Integer(FList
.Value)))^;
inc(j);
end;
end;
[
本帖最后由 wuyou 于 2018-11-6 11:20 编辑
]
Passion
(LiuXiao)
管理员
UID 359
Digest Posts
19
Credits 6854
Posts 3598
点点分 6854
Reading Access 102
Registered 2004-3-28
Status Offline
#2
Post at 2018-11-6 22:45
Profile
|
Blog
|
P.M.
您的建议有道理,我们已将FList移动至protected节,git上的cnvcl代码已更新。
Poll
Trade
Reward
Activity
CnPack Forum
CnPack English Forum
> CnWizards IDE Wizards
> CVSTracNT
> Announcements & Others
All times are GMT++8, the time now is 2025-2-16 23:24
Powered by
Discuz!
5.0.0
© 2001-2006
Comsenz Inc.
Processed in 0.007041 second(s), 7 queries , Gzip enabled
TOP
Clear Cookies
-
Contact Us
-
CnPack Website
-
Archiver
-
WAP
Member's CP Home
Edit Profile
Credits Transaction
Public User Groups
Buddy List
Main
Page Views
User Agents
Posts History
Top Forums
Top Threads
Post Ranking
Credit Ranking
Online Time
Team
Moderation Stats