MCPcopy Create free account
hub / github.com/cxasm/notepad-- / insertNewFileNode

Method insertNewFileNode

src/cceditor/filemanager.cpp:202–208  ·  view source on GitHub ↗

务必要保证不能重复id,所以newnode后,必须接着调用insertNewFileNode,避免重复了

Source from the content-addressed store, hash-verified

200
201//务必要保证不能重复id,所以newnode后,必须接着调用insertNewFileNode,避免重复了
202void FileManager::insertNewFileNode(NewFileIdMgr node)
203{
204 m_newFileIdList.append(node);
205 std::sort(m_newFileIdList.begin(), m_newFileIdList.end(), [](NewFileIdMgr& a, NewFileIdMgr& b) {
206 return a.index < b.index;
207 });
208}
209
210//删除newfile id的节点
211void FileManager::delNewFileNode(int fileIndex)

Callers 1

newTxtFileMethod · 0.80

Calls 3

appendMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected