Fix random warnings from clang 8.0.0

This commit is contained in:
Tamás Bálint Misius 2020-01-21 14:43:22 +01:00
parent 467be1dcb9
commit 7330d0412a
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
6 changed files with 6 additions and 12 deletions

View File

@ -2419,7 +2419,7 @@ char * GameSave::serialiseOPS(unsigned int & dataLength)
soapLinkData = new unsigned char[3*soapCount];
if (!soapLinkData)
throw BuildException("Save error, out of memory (SOAP)");
soapLinkDataPtr = std::move(std::unique_ptr<unsigned char[]>(soapLinkData));
soapLinkDataPtr = std::unique_ptr<unsigned char[]>(soapLinkData);
//Iterate through particles in the same order that they were saved
for (y=0;y<fullH;y++)

View File

@ -297,7 +297,7 @@ void GameController::Install()
#if defined(MACOSX)
new InformationMessage("No installation necessary", "You don't need to install The Powder Toy on OS X", false);
#elif defined(WIN) || defined(LIN)
new ConfirmPrompt("Install The Powder Toy", "Do you wish to install The Powder Toy on this computer?\nThis allows you to open save files and saves directly from the website.", { [this] {
new ConfirmPrompt("Install The Powder Toy", "Do you wish to install The Powder Toy on this computer?\nThis allows you to open save files and saves directly from the website.", { [] {
if (Client::Ref().DoInstallation())
{
new InformationMessage("Success", "Installation completed", false);

View File

@ -12,7 +12,6 @@ class DropDownWindow : public ui::Window
DropDown * dropDown;
Appearance appearance;
std::vector<Button> buttons;
bool isMouseInside;
public:
DropDownWindow(DropDown * dropDown):

View File

@ -602,7 +602,7 @@ void PreviewView::NotifyCommentsChanged(PreviewModel * sender)
if (showAvatars)
{
tempAvatar = new ui::AvatarButton(ui::Point(2, currentY+7), ui::Point(26, 26), comments->at(i)->authorName);
tempAvatar->SetActionCallback({ [this, tempAvatar] {
tempAvatar->SetActionCallback({ [tempAvatar] {
if (tempAvatar->GetUsername().size() > 0)
{
new ProfileActivity(tempAvatar->GetUsername());

View File

@ -48,7 +48,7 @@ RenderView::RenderView():
renderModes.push_back(renderModeCheckbox);
renderModeCheckbox->mode = mode;
renderModeCheckbox->SetIcon(icon);
renderModeCheckbox->SetActionCallback({ [this, mode, renderModeCheckbox] {
renderModeCheckbox->SetActionCallback({ [this, renderModeCheckbox] {
if (renderModeCheckbox->GetChecked())
c->SetRenderMode(renderModeCheckbox->mode);
else
@ -69,7 +69,7 @@ RenderView::RenderView():
displayModes.push_back(displayModeCheckbox);
displayModeCheckbox->mode = mode;
displayModeCheckbox->SetIcon(icon);
displayModeCheckbox->SetActionCallback({ [this, mode, displayModeCheckbox] {
displayModeCheckbox->SetActionCallback({ [this, displayModeCheckbox] {
if (displayModeCheckbox->GetChecked())
c->SetDisplayMode(displayModeCheckbox->mode);
else
@ -99,7 +99,7 @@ RenderView::RenderView():
colourModes.push_back(colourModeCheckbox);
colourModeCheckbox->mode = mode;
colourModeCheckbox->SetIcon(icon);
colourModeCheckbox->SetActionCallback({ [this, mode, colourModeCheckbox] {
colourModeCheckbox->SetActionCallback({ [this, colourModeCheckbox] {
if(colourModeCheckbox->GetChecked())
c->SetColourMode(colourModeCheckbox->mode);
else

View File

@ -50,16 +50,11 @@ void Element::Element_PPIP()
Graphics = &Element_PIPE_graphics;
}
constexpr int PFLAG_NORMALSPEED = 0x00010000;
// parts[].tmp flags
// trigger flags to be processed this frame (trigger flags for next frame are shifted 3 bits to the left):
constexpr int PPIP_TMPFLAG_TRIGGER_ON = 0x10000000;
constexpr int PPIP_TMPFLAG_TRIGGER_OFF = 0x08000000;
constexpr int PPIP_TMPFLAG_TRIGGER_REVERSE = 0x04000000;
constexpr int PPIP_TMPFLAG_TRIGGERS = 0x1C000000;
// current status of the pipe
constexpr int PPIP_TMPFLAG_PAUSED = 0x02000000;
constexpr int PPIP_TMPFLAG_REVERSED = 0x01000000;
// 0x000000FF element
// 0x00000100 is single pixel pipe
// 0x00000200 will transfer like a single pixel pipe when in forward mode