Browse Source

Clang-tidy: performance-unnecessary-value-param

pull/2243/head
Anders Jenbo 5 years ago
parent
commit
51d5c8bcab
  1. 2
      Source/DiabloUI/dialogs.cpp
  2. 2
      Source/DiabloUI/dialogs.h
  3. 3
      Source/utils/soundsample.cpp

2
Source/DiabloUI/dialogs.cpp

@ -299,7 +299,7 @@ void UiErrorOkDialog(const char *text, const char *caption, bool error)
UiOkDialog(text, caption, error, vecNULL);
}
void UiErrorOkDialog(const char *text, std::vector<UiItemBase *> renderBehind)
void UiErrorOkDialog(const char *text, const std::vector<UiItemBase *>& renderBehind)
{
UiErrorOkDialog(text, nullptr, std::move(renderBehind));
}

2
Source/DiabloUI/dialogs.h

@ -6,7 +6,7 @@
namespace devilution {
void UiErrorOkDialog(const char *text, std::vector<UiItemBase *> renderBehind);
void UiErrorOkDialog(const char *text, const std::vector<UiItemBase *>& renderBehind);
void UiErrorOkDialog(const char *text, const char *caption, const std::vector<UiItemBase *> &renderBehind);
void UiOkDialog(const char *text, const char *caption, bool error, const std::vector<UiItemBase *> &renderBehind);

3
Source/utils/soundsample.cpp

@ -2,6 +2,7 @@
#include <chrono>
#include <cmath>
#include <utility>
#include <Aulib/DecoderDrwav.h>
#include <Aulib/ResamplerSpeex.h>
@ -136,7 +137,7 @@ int SoundSample::SetChunkStream(std::string filePath)
#ifndef STREAM_ALL_AUDIO
int SoundSample::SetChunk(ArraySharedPtr<std::uint8_t> fileData, std::size_t dwBytes)
{
file_data_ = fileData;
file_data_ = std::move(fileData);
file_data_size_ = dwBytes;
SDL_RWops *buf = SDL_RWFromConstMem(file_data_.get(), dwBytes);
if (buf == nullptr) {

Loading…
Cancel
Save