Skip to content

Commit

Permalink
Fix codacy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
muratovv committed Aug 2, 2017
1 parent 81e5925 commit d802184
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions iroha-cli/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,19 @@
* limitations under the License.
*/

#include <utility>
#include "client.hpp"
#include "ametsuchi/block_serializer.hpp"
#include "model/converters/pb_transaction_factory.hpp"

namespace iroha_cli {

CliClient::CliClient(std::string target_ip, int port)
: client_(target_ip, port) {}
: client_(std::move(target_ip), port) {}

CliClient::Status CliClient::sendTx(std::string json_tx) {
iroha::ametsuchi::BlockSerializer serializer;
auto tx_opt = serializer.deserialize(json_tx);
auto tx_opt = serializer.deserialize(std::move(json_tx));
if (not tx_opt.has_value()) {
return WRONG_FORMAT;
}
Expand Down
3 changes: 2 additions & 1 deletion iroha-cli/impl/keys_manager_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
* limitations under the License.
*/

#include <utility>
#include "keys_manager_impl.hpp"
#include <fstream>
#include "common/types.hpp"

namespace iroha_cli {

KeysManagerImpl::KeysManagerImpl(std::string account_name)
: account_name_(account_name) {}
: account_name_(std::move(account_name)) {}

nonstd::optional<iroha::ed25519::keypair_t> KeysManagerImpl::loadKeys() {
// Try to load from local file
Expand Down
2 changes: 1 addition & 1 deletion iroha-cli/impl/keys_manager_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
namespace iroha_cli {
class KeysManagerImpl : public KeysManager {
public:
KeysManagerImpl(std::string account_name);
explicit KeysManagerImpl(std::string account_name);

nonstd::optional<iroha::ed25519::keypair_t> loadKeys() override;

Expand Down
3 changes: 2 additions & 1 deletion irohad/model/model_crypto_provider_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ namespace iroha {

class ModelCryptoProviderImpl : public ModelCryptoProvider {
public:
ModelCryptoProviderImpl(ed25519::keypair_t);
explicit ModelCryptoProviderImpl(ed25519::keypair_t);

bool verify(const Transaction &tx) const override;

bool verify(std::shared_ptr<const Query> tx) const override;

bool verify(const Block& block) const override;
Expand Down

0 comments on commit d802184

Please sign in to comment.