summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib
diff options
context:
space:
mode:
author Oliver Stöneberg <firewave@users.noreply.github.com>2020-01-31 02:01:48 +0100
committer GitHub <noreply@github.com>2020-01-30 20:01:48 -0500
commit059243f68ec0c2e327a3105a9480f50e5e0b4abf (patch)
treecbf132320ebc93ae4c58d60fd3a5ed834c2e8862 /src/lib
parent06ecc1ca0d96a7d9cc66aab6a5aa8b8f0265fa09 (diff)
fixed some clang-tidy warnings (nw) (#6236)
* fixed some modernize-redundant-void-arg clang-tidy warnings (nw) * fixed some modernize-use-bool-literals clang-tidy warnings (nw) * fixed some modernize-use-emplace clang-tidy warnings (nw) * fixed some performance-move-const-arg clang-tidy warnings (nw) * fixed some readability-redundant-control-flow clang-tidy warnings (nw) * fixed some readability-redundant-string-cstr clang-tidy warnings (nw) * fixed some performance-unnecessary-value-param clang-tidy warnings (nw)
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util/chd.cpp2
-rw-r--r--src/lib/util/chdcd.cpp4
-rw-r--r--src/lib/util/corefile.cpp2
-rw-r--r--src/lib/util/huffman.cpp2
-rw-r--r--src/lib/util/options.cpp2
-rw-r--r--src/lib/util/pool.cpp2
-rw-r--r--src/lib/util/unzip.cpp2
7 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/util/chd.cpp b/src/lib/util/chd.cpp
index d71eb436ea0..274c6a37aab 100644
--- a/src/lib/util/chd.cpp
+++ b/src/lib/util/chd.cpp
@@ -2947,7 +2947,7 @@ chd_error chd_file_compressor::compress_continue(double &progress, double &ratio
hunk_write_compressed(item.m_hunknum, item.m_compression, item.m_compressed, item.m_complen, item.m_hash[0].m_crc16);
m_total_out += item.m_complen;
m_current_map.add(item.m_hunknum, item.m_hash[0].m_crc16, item.m_hash[0].m_sha1);
- } while (0);
+ } while (false);
// reset the item and advance
item.m_status = WS_READY;
diff --git a/src/lib/util/chdcd.cpp b/src/lib/util/chdcd.cpp
index aafac22e968..b2b0e141499 100644
--- a/src/lib/util/chdcd.cpp
+++ b/src/lib/util/chdcd.cpp
@@ -262,7 +262,7 @@ static uint32_t parse_wav_sample(const char *filename, uint32_t *dataoffs)
}
/* seek until we find a format tag */
- while (1)
+ while (true)
{
file->read(buf, offset, 4, actual);
offset += actual;
@@ -329,7 +329,7 @@ static uint32_t parse_wav_sample(const char *filename, uint32_t *dataoffs)
offset += length - 16;
/* seek until we find a data tag */
- while (1)
+ while (true)
{
file->read(buf, offset, 4, actual);
offset += actual;
diff --git a/src/lib/util/corefile.cpp b/src/lib/util/corefile.cpp
index 5b8babfc33a..9357f1cdb36 100644
--- a/src/lib/util/corefile.cpp
+++ b/src/lib/util/corefile.cpp
@@ -647,7 +647,7 @@ bool core_in_memory_file::eof() const
{
// check for buffered chars
if (has_putback())
- return 0;
+ return false;
// if the offset == length, we're at EOF
return (m_offset >= m_length);
diff --git a/src/lib/util/huffman.cpp b/src/lib/util/huffman.cpp
index 23b13bdaf09..1d531fdd634 100644
--- a/src/lib/util/huffman.cpp
+++ b/src/lib/util/huffman.cpp
@@ -431,7 +431,7 @@ huffman_error huffman_context_base::compute_tree_from_histo()
// binary search to achieve the optimum encoding
uint32_t lowerweight = 0;
uint32_t upperweight = sdatacount * 2;
- while (1)
+ while (true)
{
// build a tree using the current weight
uint32_t curweight = (upperweight + lowerweight) / 2;
diff --git a/src/lib/util/options.cpp b/src/lib/util/options.cpp
index bc7b72f896d..3e5cb001378 100644
--- a/src/lib/util/options.cpp
+++ b/src/lib/util/options.cpp
@@ -657,7 +657,7 @@ void core_options::parse_command_line(const std::vector<std::string> &args, int
// special case - collect unadorned arguments after commands into a special place
if (is_unadorned && !m_command.empty())
{
- m_command_arguments.push_back(std::move(args[arg]));
+ m_command_arguments.push_back(args[arg]);
command_argument_processed();
continue;
}
diff --git a/src/lib/util/pool.cpp b/src/lib/util/pool.cpp
index 481b8b97f7f..6bf049db03d 100644
--- a/src/lib/util/pool.cpp
+++ b/src/lib/util/pool.cpp
@@ -578,7 +578,7 @@ static void memory_error(const char *message)
* @return An int.
*/
-bool test_memory_pools(void)
+bool test_memory_pools()
{
object_pool *pool;
void *ptrs[16];
diff --git a/src/lib/util/unzip.cpp b/src/lib/util/unzip.cpp
index 836d67f1113..a659445e1cc 100644
--- a/src/lib/util/unzip.cpp
+++ b/src/lib/util/unzip.cpp
@@ -1159,7 +1159,7 @@ archive_file::error zip_file_impl::decompress_data_type_8(std::uint64_t offset,
}
// loop until we're done
- while (1)
+ while (true)
{
// read in the next chunk of data
std::uint32_t read_length(0);