-2

I saw this function in c++ code

GRenderWindow::GRenderWindow(QWidget* parent, EmuThread* emu_thread)
    : QWidget(parent), child(nullptr), emu_thread(emu_thread) {

    std::string window_title = Common::StringFromFormat("yuzu %s| %s-%s", Common::g_build_name,
                                                        Common::g_scm_branch, Common::g_scm_desc);
    setWindowTitle(QString::fromStdString(window_title));

    InputCommon::Init();
}

What does the single colon mean? Does the part after the single colon means return?

 .... : QWidget(parent), child(nullptr), emu_thread(emu_thread) {}

Original code: https://github.com/yuzu-emu/yuzu/blob/master/src/yuzu/bootmanager.cpp

Blastfurnace
  • 17,981
  • 46
  • 54
  • 68
kenpeter
  • 6,266
  • 11
  • 57
  • 86

1 Answers1

0

It is the start of a constructor initializer list.

Fantastic Mr Fox
  • 30,083
  • 25
  • 91
  • 165