Refactor public interface to be less strict C and more python friendly

* Generally this means removing ref out parameters and instead returning
  values. In a couple of cases we will want to avoid copies in future
  either by returning const references (e.g. to the pipeline state which
  is immutable).
* At the same time, some pointless bool return values that were always
  true and didn't indicate errors have been removed. They can be added
  again if an error condition comes back.
* Some free functions still have out parameters as C linkage doesn't
  allow returning user types by value.
* The C# UI still invokes into C wrappers for all the C++ classes, which
  handle taking the return value and doing a copy into an out parameter
  still for compatibility.
This commit is contained in:
baldurk
2017-04-07 11:04:26 +01:00
parent a1f2fdacbc
commit f6c045f473
27 changed files with 805 additions and 1001 deletions
+2 -3
View File
@@ -381,7 +381,7 @@ void MainWindow::OnInjectTrigger(uint32_t PID, const QList<EnvironmentModificati
env[i].value.toUtf8().data(), env[i].type,
env[i].separator);
uint32_t ret = RENDERDOC_InjectIntoProcess(PID, envList, logfile.toUtf8().data(), &opts, false);
uint32_t ret = RENDERDOC_InjectIntoProcess(PID, envList, logfile.toUtf8().data(), opts, false);
RENDERDOC_FreeEnvironmentModificationList(envList);
@@ -959,8 +959,7 @@ void MainWindow::messageCheck()
if(m_Ctx.LogLoaded())
{
m_Ctx.Renderer().AsyncInvoke([this](IReplayRenderer *r) {
rdctype::array<DebugMessage> msgs;
r->GetDebugMessages(&msgs);
rdctype::array<DebugMessage> msgs = r->GetDebugMessages();
bool disconnected = false;