MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / close

Method close

Examples/SCExample/HotReloadSystem.h:110–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108 memcpy(state.isysroot, iosSysroot.bytesIncludingTerminator(), iosSysroot.sizeInBytesIncludingTerminator());
109 setSysroot(iosSysroot);
110 }
111
112 // Setup Compiler
113 SC_TRY(PluginCompiler::findBestCompiler(compiler));
114 SC_TRY(PluginSysroot::findBestSysroot(compiler.type, sysroot));
115 SC_TRY(state.includePathsText.assign(options.defaultIncludePathsText));
116 SC_TRY(rebuildCompilerIncludePaths());
117
118 // Setup File System Watcher
119 fileSystemWatcherRunner.init(*eventLoop);
120 SC_TRY(fileSystemWatcher.init(fileSystemWatcherRunner));
121 folderWatcher.notifyCallback.bind<HotReloadSystem, &HotReloadSystem::onFileChange>(*this);
122 SC_TRY(fileSystemWatcher.watch(folderWatcher, state.examplesPath.view()));
123 return Result(true);
124 }
125
126 Result close()
127 {
128 Result result(true);
129 auto preserveFirstError = [&result](Result closeResult)
130 {
131 if (not closeResult and result)
132 {
133 result = closeResult;
134 }
135 };
136
137 preserveFirstError(fileSystemWatcher.close());
138 if (eventLoop)
139 {
140 for (size_t idx = 0; idx < registry.getNumberOfEntries(); ++idx)

Callers

nothing calls this directly

Calls 4

getNumberOfEntriesMethod · 0.80
queryInterfaceMethod · 0.80
isValidMethod · 0.45
closeAsyncMethod · 0.45

Tested by

no test coverage detected