Skip to content

Commit

Permalink
STAT-182 (EOSIOGH-725) Fixed missed eos namespaces and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjohnson5972 committed Nov 22, 2017
1 parent edf0b26 commit 523243c
Show file tree
Hide file tree
Showing 25 changed files with 31 additions and 30 deletions.
2 changes: 1 addition & 1 deletion contracts/currency/currency.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace TOKEN_NAME {
/**
Defines the database table for account information
**/
using accounts = table<N(defaultscope),N(currency),N(account),account,uint64_t>;
using accounts = eosio::table<N(defaultscope),N(currency),N(account),account,uint64_t>;

/**
* accounts information for owner is stored:
Expand Down
6 changes: 3 additions & 3 deletions contracts/dice/dice.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ namespace dice {
bool is_empty()const { return ! ( bool(eos_balance) | open_offers); }
};

using accounts = table<N(dice),N(dice),N(account),account,uint64_t>;
using global_dices = table<N(dice),N(dice),N(global),global_dice,uint64_t>;
using offers = table<N(dice),N(dice),N(global),global_dice,offer_primary_key,uint128_t>;
using accounts = eosio::table<N(dice),N(dice),N(account),account,uint64_t>;
using global_dices = eosio::table<N(dice),N(dice),N(global),global_dice,uint64_t>;
using offers = eosio::table<N(dice),N(dice),N(global),global_dice,offer_primary_key,uint128_t>;

inline account get_account( account_name owner ) {
account owned_account(owner);
Expand Down
2 changes: 1 addition & 1 deletion contracts/eoslib/account.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ namespace eosio { namespace account {
* test1_balance.account = N(test1);
* if (account_api::get(test1_balance))
* {
* eos::print("test1 balance=", test1_balance.eos_balance, "\n");
* eosio::print("test1 balance=", test1_balance.eos_balance, "\n");
* }
* @endcode
* @{
Expand Down
4 changes: 3 additions & 1 deletion contracts/eoslib/db.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <eoslib/db.h>


namespace eosio {

/**
* @ingroup databaseCpp
Expand Down Expand Up @@ -1009,8 +1010,9 @@ struct table<scope,code,table_n,Record,PrimaryType,void> {
}
}; /// @}

} // namespace eosio

#define TABLE2(NAME, SCOPE, CODE, TABLE, TYPE, PRIMARY_NAME, PRIMARY_TYPE, SECONDARY_NAME, SECONDARY_TYPE) \
using NAME = table<N(SCOPE),N(CODE),N(TABLE),TYPE,PRIMARY_TYPE,SECONDARY_TYPE>; \
using NAME = eosio::table<N(SCOPE),N(CODE),N(TABLE),TYPE,PRIMARY_TYPE,SECONDARY_TYPE>; \
typedef NAME::primary_index PRIMARY_NAME; \
typedef NAME::secondary_index SECONDARY_NAME;
2 changes: 1 addition & 1 deletion contracts/eoslib/fixedpoint.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include <eoslib/types.h>

namespace eos
namespace eosio
{
/**
* @defgroup fixed_point Template classes for Fixed Point representaton
Expand Down
2 changes: 1 addition & 1 deletion contracts/eoslib/real.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <eoslib/math.hpp>
#include <eoslib/print.hpp>

namespace eos {
namespace eosio {
/**
* @defgroup real data type representation for eos
* @brief real data type with basic operators. Contract developers need not use the math APIs
Expand Down
2 changes: 1 addition & 1 deletion contracts/exchange/exchange.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace exchange {
bool is_empty()const { return ! ( bool(eos_balance) | bool(currency_balance) | open_orders); }
};

using accounts = table<N(exchange),N(exchange),N(account),account,uint64_t>;
using accounts = eosio::table<N(exchange),N(exchange),N(account),account,uint64_t>;

TABLE2(bids,exchange,exchange,bids,bid,bids_by_id,order_id,bids_by_price,price);
TABLE2(asks,exchange,exchange,asks,ask,asks_by_id,order_id,asks_by_price,price);
Expand Down
2 changes: 1 addition & 1 deletion contracts/infinite/infinite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace infinite {
};
static_assert( sizeof(account) == sizeof(uint64_t)+sizeof(currency_tokens), "unexpected packing" );

using accounts = table<N(currency),N(currency),N(account),account,uint64_t>;
using accounts = eosio::table<N(currency),N(currency),N(account),account,uint64_t>;

/**
* accounts information for owner is stored:
Expand Down
2 changes: 1 addition & 1 deletion contracts/proxy/proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ namespace proxy {
account_name owner;
};

using configs = table<N(proxy),N(proxy),N(configs),config,uint64_t>;
using configs = eosio::table<N(proxy),N(proxy),N(configs),config,uint64_t>;

} /// namespace proxy
2 changes: 1 addition & 1 deletion contracts/storage/storage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ namespace TOKEN_NAME {
/**
Defines the database table for account information
**/
using accounts = table<N(storage),N(storage),N(account),account,uint64_t>;
using accounts = eosio::table<N(storage),N(storage),N(account),account,uint64_t>;

/**
* accounts information for owner is stored:
Expand Down
6 changes: 3 additions & 3 deletions contracts/test_api/test_db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ unsigned int test_db::key_str_table() {
const char* atr[] = { "atr", "atr", "atr", "atr" };
const char* ztr[] = { "ztr", "ztr", "ztr", "ztr" };

var_table<N(tester), N(tester), N(atr), char*> StringTableAtr;
var_table<N(tester), N(tester), N(ztr), char*> StringTableZtr;
var_table<N(tester), N(tester), N(str), char*> StringTableStr;
eosio::var_table<N(tester), N(tester), N(atr), char*> StringTableAtr;
eosio::var_table<N(tester), N(tester), N(ztr), char*> StringTableZtr;
eosio::var_table<N(tester), N(tester), N(str), char*> StringTableStr;

uint32_t res = 0;

Expand Down
2 changes: 1 addition & 1 deletion contracts/test_api/test_fixedpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <eoslib/eos.hpp>

#include "test_api.hpp"
using namespace eos;
using namespace eosio;
unsigned int test_fixedpoint::create_instances()
{
{
Expand Down
2 changes: 1 addition & 1 deletion contracts/test_api/test_real.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <eoslib/eos.hpp>

#include "test_api.hpp"
using namespace eos;
using namespace eosio;
unsigned int test_real::create_instances() {
real lhs1(5);
WASM_ASSERT(lhs1.value() == 5, "real instance value is wrong");
Expand Down
2 changes: 1 addition & 1 deletion contracts/tic_tac_toe/tic_tac_toe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,6 @@ namespace tic_tac_toe {
/**
* @brief table to store list of games
*/
using Games = table<N(tic.tac.toe),N(tic.tac.toe),N(games),game,uint64_t>;
using Games = eosio::table<N(tic.tac.toe),N(tic.tac.toe),N(games),game,uint64_t>;
}
/// @}
2 changes: 1 addition & 1 deletion libraries/chain/include/eos/chain/producer_objects.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ using producer_schedule_multi_index = chainbase::shared_multi_index_container<
>
>;

} } // namespace native::eos
} } // namespace eosio::chain

CHAINBASE_SET_INDEX_TYPE(eosio::chain::producer_votes_object, eosio::chain::producer_votes_multi_index)
CHAINBASE_SET_INDEX_TYPE(eosio::chain::proxy_vote_object, eosio::chain::proxy_vote_multi_index)
Expand Down
2 changes: 1 addition & 1 deletion libraries/native_contract/eos_contract.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,5 +494,5 @@ void apply_eos_unlinkauth(apply_context& context) {
db.remove(*link);
}

} // namespace eos
} // namespace eosio
} // namespace native
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ void apply_eos_deleteauth(chain::apply_context&);
void apply_eos_linkauth(chain::apply_context&);
void apply_eos_unlinkauth(chain::apply_context&);

} // namespace eos
} // namespace eosio
} // namespace native
2 changes: 1 addition & 1 deletion plugins/account_history_plugin/account_history_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,4 @@ read_only::get_controlled_accounts_results read_only::get_controlled_accounts(co
}

} // namespace account_history_apis
} // namespace eos
} // namespace eosio
3 changes: 1 addition & 2 deletions plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@

namespace eosio {

using namespace eosio;
using fc::flat_map;
using chain::block_id_type;
using chain::fork_database;
Expand Down Expand Up @@ -481,4 +480,4 @@ read_only::get_required_keys_result read_only::get_required_keys( const get_requ


} // namespace chain_apis
} // namespace eos
} // namespace eosio
2 changes: 1 addition & 1 deletion plugins/db_plugin/db_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,4 +746,4 @@ void db_plugin::plugin_shutdown()
my.reset();
}

} // namespace eos
} // namespace eosio
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,6 @@ class wallet_manager {
};

} // namespace wallet
} // namespace eos
} // namespace eosio


2 changes: 1 addition & 1 deletion plugins/wallet_plugin/wallet_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,4 @@ wallet_manager::sign_transaction(const chain::signed_transaction& txn, const fla
}

} // namespace wallet
} // namespace eos
} // namespace eosio
2 changes: 1 addition & 1 deletion plugins/wallet_plugin/wallet_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ void wallet_plugin::plugin_initialize(const variables_map& options) {
wallet_manager_ptr->set_timeout(t);
}
}
} // namespace eos
} // namespace eosio
2 changes: 1 addition & 1 deletion tests/tests/database_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ BOOST_FIXTURE_TEST_CASE(get_blocks, testing_fixture)
// Check that block 21 can now be found
BOOST_CHECK_EQUAL(chain.get_block_id_for_num(21), chain.head_block_id());
} FC_LOG_AND_RETHROW() }
} // namespace eos
} // namespace eosio
2 changes: 1 addition & 1 deletion tests/tests/misc_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,4 +321,4 @@ BOOST_AUTO_TEST_CASE(alphabetic_sort)

BOOST_AUTO_TEST_SUITE_END()

} // namespace eos
} // namespace eosio

0 comments on commit 523243c

Please sign in to comment.