Skip to content

Commit ce4590a

Browse files
Fix security group compression (#3410)
* Fix security group compression. Improved algorithm : slightly better performances and redistribution of responsabilities. Signed-off-by: BOUTIER Charly <[email protected]>
1 parent 341a5e7 commit ce4590a

File tree

3 files changed

+152
-158
lines changed

3 files changed

+152
-158
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Copyright (c) 2025, RTE (http://www.rte-france.com)
3+
* This Source Code Form is subject to the terms of the Mozilla Public
4+
* License, v. 2.0. If a copy of the MPL was not distributed with this
5+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6+
*/
7+
import { SecurityGroupMembersMap } from './layout.type';
8+
9+
export function addMember(map: SecurityGroupMembersMap, key: string, member: string) {
10+
const group = map.get(key);
11+
if (group) {
12+
group.push(member);
13+
} else {
14+
map.set(key, [member]);
15+
}
16+
}

0 commit comments

Comments
 (0)