-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
  • 18,411
  • 56
  • 55
  • 70
kenpeter
  • 7,404
  • 14
  • 64
  • 95

1 Answers1

0

It is the start of a constructor initializer list.

Fantastic Mr Fox
  • 32,495
  • 27
  • 95
  • 175