MCPcopy Create free account
hub / github.com/chrxh/alien / insert

Function insert

source/EngineInterface/PreviewDescriptionService.cpp:37–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35 };
36
37 void insert(PreviewDescriptionIntern& target, PreviewDescriptionIntern const& source)
38 {
39 auto offset = toInt(source.cells.size());
40 for (auto& cell : target.cells) {
41 std::set<int> newConnectionIndices;
42 for (auto const& connectionIndex : cell.connectionIndices) {
43 newConnectionIndices.insert(connectionIndex + offset);
44 }
45 cell.connectionIndices = newConnectionIndices;
46 }
47 target.cells.insert(target.cells.begin(), source.cells.begin(), source.cells.end());
48 target.symbols.insert(target.symbols.begin(), source.symbols.begin(), source.symbols.end());
49 }
50
51 void rotate(PreviewDescriptionIntern& previewIntern, RealVector2D const& center, float angle)
52 {

Callers 1

Calls 4

toIntFunction · 0.85
sizeMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected