diff --git a/src/account/EscrowTransaction.cpp b/src/account/EscrowTransaction.cpp index 750fb16b..615959ac 100644 --- a/src/account/EscrowTransaction.cpp +++ b/src/account/EscrowTransaction.cpp @@ -87,8 +87,7 @@ namespace sgns uint64_t num_chunks = tx_struct.num_chunks(); float dev_cut = tx_struct.dev_cut(); uint256_t dev_addr( tx_struct.dev_addr() ); - return EscrowTransaction( UTXOTxParameters{ inputs, outputs }, num_chunks, dev_addr, dev_cut, - tx_struct.dag_struct() ); // Return new instance + return { UTXOTxParameters{ inputs, outputs }, num_chunks, dev_addr, dev_cut, tx_struct.dag_struct() }; } uint64_t EscrowTransaction::GetNumChunks() const diff --git a/src/crypto/bip39/mnemonic.cpp b/src/crypto/bip39/mnemonic.cpp index 16e19fbb..7a5824d8 100644 --- a/src/crypto/bip39/mnemonic.cpp +++ b/src/crypto/bip39/mnemonic.cpp @@ -47,10 +47,10 @@ namespace sgns::crypto::bip39 { mnemonic_list = phrase; } - if (mnemonic_list.find("/") != std::string_view::npos) { - base::createLogger(kMnemonicLoggerString) - ->error("junctions are not supported yet"); - return bip39::MnemonicError::INVALID_MNEMONIC; + if ( mnemonic_list.find( '/' ) != std::string_view::npos ) + { + base::createLogger( kMnemonicLoggerString )->error( "junctions are not supported yet" ); + return bip39::MnemonicError::INVALID_MNEMONIC; } // split word list into separate words diff --git a/src/processing/processing_imagesplit.cpp b/src/processing/processing_imagesplit.cpp index f356a5a6..d35d6346 100644 --- a/src/processing/processing_imagesplit.cpp +++ b/src/processing/processing_imagesplit.cpp @@ -36,17 +36,16 @@ namespace sgns::processing // SplitImageData(); //} - ImageSplitter::ImageSplitter(const std::vector& buffer, - uint32_t blockstride, - uint32_t blocklinestride, - uint32_t blocklen) - : blockstride_(blockstride), blocklinestride_(blocklinestride), blocklen_(blocklen) { - // Set inputImage and imageSize from the provided buffer - //inputImage = reinterpret_cast(buffer.data()); - - inputImage = reinterpret_cast(buffer.data()); - imageSize = buffer.size(); - + ImageSplitter::ImageSplitter( const std::vector &buffer, + uint32_t blockstride, + uint32_t blocklinestride, + uint32_t blocklen ) : + blockstride_( blockstride ), + blocklinestride_( blocklinestride ), + blocklen_( blocklen ), + inputImage( reinterpret_cast( buffer.data() ) ), + imageSize( buffer.size() ) + { SplitImageData(); } @@ -72,7 +71,7 @@ namespace sgns::processing return index; } //Index out of range - return -1; + return -1; } void ImageSplitter::SplitImageData() @@ -116,7 +115,7 @@ namespace sgns::processing SHA256_Final(shahash.data(), &sha256); auto hash = libp2p::multi::Multihash::create(libp2p::multi::HashType::sha256, shahash); cids_.emplace_back( libp2p::multi::ContentIdentifier::Version::V0, - libp2p::multi::MulticodecType::Code::DAG_PB, + libp2p::multi::MulticodecType::Code::DAG_PB, hash.value() ); } } diff --git a/src/processing/processors/processing_processor_mnn_posenet.hpp b/src/processing/processors/processing_processor_mnn_posenet.hpp index 46f4eefa..760b1da8 100644 --- a/src/processing/processors/processing_processor_mnn_posenet.hpp +++ b/src/processing/processors/processing_processor_mnn_posenet.hpp @@ -70,8 +70,10 @@ namespace sgns::processing * @param origwidth - Width of image * @param origheight - Height of image */ - MNN::Tensor MNNProcess( const std::vector &imgdata, const int origwidth, const int origheight, - const std::string filename = "" ); + MNN::Tensor MNNProcess( const std::vector &imgdata, + int origwidth, + int origheight, + const std::string &filename = "" ); std::unique_ptr>> imageData_; std::unique_ptr> modelFile_;