mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
moved call to rng constructor to main()
This commit is contained in:
parent
a5d73a9a60
commit
e92840c849
3 changed files with 14 additions and 5 deletions
|
|
@ -22,7 +22,9 @@
|
|||
#include <QTextCodec>
|
||||
#include <iostream>
|
||||
#include "servatrice.h"
|
||||
#include "rng_abstract.h"
|
||||
#include "rng_sfmt.h"
|
||||
|
||||
RNG_Abstract *rng;
|
||||
|
||||
void myMessageOutput(QtMsgType /*type*/, const char *msg)
|
||||
{
|
||||
|
|
@ -76,6 +78,8 @@ int main(int argc, char *argv[])
|
|||
app.setApplicationName("Servatrice");
|
||||
|
||||
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
|
||||
|
||||
rng = new RNG_SFMT;
|
||||
|
||||
std::cerr << "Servatrice " << Servatrice::versionString.toStdString() << " starting." << std::endl;
|
||||
std::cerr << "-------------------------" << std::endl;
|
||||
|
|
@ -87,5 +91,9 @@ int main(int argc, char *argv[])
|
|||
std::cerr << "-------------------------" << std::endl;
|
||||
std::cerr << "Server initialized." << std::endl;
|
||||
|
||||
return app.exec();
|
||||
int retval = app.exec();
|
||||
|
||||
delete rng;
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue