Skip to content

Commit

Permalink
Merge pull request JDimproved#1333 from JDimproved/organize-function-…
Browse files Browse the repository at this point in the history
…parameter-names-part1-2-3

Organize function parameter names part1,2,3
  • Loading branch information
ma8ma committed Jan 27, 2024
2 parents 57c4bac + cecb134 commit d44c393
Show file tree
Hide file tree
Showing 23 changed files with 57 additions and 56 deletions.
2 changes: 1 addition & 1 deletion src/article/articleviewbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ namespace ARTICLE
bool slot_motion_notify( GdkEventMotion* event );
bool slot_key_release( GdkEventKey* event );
bool slot_scroll_event( GdkEventScroll* event );
bool slot_leave_notify( GdkEventCrossing* ev );
bool slot_leave_notify( GdkEventCrossing* event );

// レスポップアップ関係

Expand Down
6 changes: 3 additions & 3 deletions src/article/drawareabase.h
Original file line number Diff line number Diff line change
Expand Up @@ -420,12 +420,12 @@ namespace ARTICLE
void set_align( LAYOUT* div, int id_end, int align );
void set_align_line( LAYOUT* div, LAYOUT* layout_from, LAYOUT* layout_to, RECTANGLE* rect_from, RECTANGLE* rect_to,
int width_line, int align );
void layout_one_text_node( LAYOUT* node, int& node_x, int& node_y, int& br_size, const int width_view );
void layout_one_img_node( LAYOUT* node, int& node_x, int& node_y, int& brsize, const int width_view,
void layout_one_text_node( LAYOUT* layout, int& x, int& y, int& br_size, const int width_view );
void layout_one_img_node( LAYOUT* layout, int& x, int& y, int& br_size, const int width_view,
const bool init_popupwin, const int mrg_right, const int mrg_bottom );

// 文字の幅などの情報
int get_width_of_one_char( const char* str, int& byte, char& pre_char, bool& wide_mode, const int mode );
int get_width_of_one_char( const char* utfstr, int& byte, char& pre_char, bool& wide_mode, const int mode );
bool set_init_wide_mode( const char* str, const int pos_start, const int pos_to );
bool is_wrapped( const int x, const int border, const char* str ) const;

Expand Down
3 changes: 2 additions & 1 deletion src/bbslist/addetcdialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ namespace BBSLIST

public:

AddEtcDialog( const bool move, const std::string& url, const std::string& _name, const std::string& _id, const std::string& _passwd );
AddEtcDialog( const bool move, const std::string& url, const std::string& name,
const std::string& id, const std::string& passwd );
~AddEtcDialog() noexcept override;

std::string get_name() const { return m_entry_name.get_text(); }
Expand Down
4 changes: 2 additions & 2 deletions src/config/globalconf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ bool CONFIG::get_instruct_tglart(){
get_confitem()->instruct_tglart_end = true; // 一度表示したら表示しない
return get_confitem()->instruct_tglart;
}
void CONFIG::set_instruct_tglart( const bool tgl ){ get_confitem()->instruct_tglart = tgl; }
void CONFIG::set_instruct_tglart( const bool set ){ get_confitem()->instruct_tglart = set; }

bool CONFIG::get_instruct_tglimg(){

Expand All @@ -417,7 +417,7 @@ bool CONFIG::get_instruct_tglimg(){
return get_confitem()->instruct_tglimg;
}

void CONFIG::set_instruct_tglimg( bool tgl ){ get_confitem()->instruct_tglimg = tgl; }
void CONFIG::set_instruct_tglimg( bool set ){ get_confitem()->instruct_tglimg = set; }


// スレビューでdeleteを押したときに確認ダイアログを表示する
Expand Down
16 changes: 8 additions & 8 deletions src/control/mouseconfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,22 +100,22 @@ void MouseConfig::set_one_motion_impl( const int id, const int mode, const std::


// 操作文字列取得
std::string MouseConfig::get_str_motions( const int id_ ) const
std::string MouseConfig::get_str_motions( const int id ) const
{
int id = id_;
int id_ = id;

// (注) この行が無いと画像ビューのコンテキストメニューにマウスジェスチャが表示されない
if( id == CONTROL::CancelMosaic ) id = CONTROL::CancelMosaicButton;
if( id_ == CONTROL::CancelMosaic ) id_ = CONTROL::CancelMosaicButton;

return MouseKeyConf::get_str_motions( id );
return MouseKeyConf::get_str_motions( id_ );
}


// IDからデフォルトの操作文字列取得
std::string MouseConfig::get_default_motions( const int id_ ) const
std::string MouseConfig::get_default_motions( const int id ) const
{
int id = id_;
if( id == CONTROL::CancelMosaic ) id = CONTROL::CancelMosaicButton;
int id_ = id;
if( id_ == CONTROL::CancelMosaic ) id_ = CONTROL::CancelMosaicButton;

return MouseKeyConf::get_default_motions( id );
return MouseKeyConf::get_default_motions( id_ );
}
4 changes: 2 additions & 2 deletions src/dbtree/article2chcompati.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

using namespace DBTREE;

Article2chCompati::Article2chCompati( const std::string& datbase, const std::string& _id, bool cached,
Article2chCompati::Article2chCompati( const std::string& datbase, const std::string& id, bool cached,
const Encoding enc )
: ArticleBase( datbase, _id, cached, enc )
: ArticleBase( datbase, id, cached, enc )
{
assert( ! get_id().empty() );

Expand Down
4 changes: 2 additions & 2 deletions src/dbtree/articlejbbs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

using namespace DBTREE;

ArticleJBBS::ArticleJBBS( const std::string& datbase, const std::string& _id, bool cached, const Encoding enc )
: ArticleBase( datbase, _id, cached, enc )
ArticleJBBS::ArticleJBBS( const std::string& datbase, const std::string& id, bool cached, const Encoding enc )
: ArticleBase( datbase, id, cached, enc )
{
assert( ! get_id().empty() );

Expand Down
4 changes: 2 additions & 2 deletions src/dbtree/articlemachi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
using namespace DBTREE;


ArticleMachi::ArticleMachi( const std::string& datbase, const std::string& _id, bool cached, const Encoding enc )
: ArticleBase( datbase, _id, cached, enc )
ArticleMachi::ArticleMachi( const std::string& datbase, const std::string& id, bool cached, const Encoding enc )
: ArticleBase( datbase, id, cached, enc )
{
assert( !get_id().empty() );

Expand Down
4 changes: 2 additions & 2 deletions src/dbtree/frontloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
using namespace DBTREE;


FrontLoader::FrontLoader( const std::string& url_boadbase )
FrontLoader::FrontLoader( const std::string& url_boardbase )
: SKELETON::TextLoader()
, m_url_boadbase( url_boadbase )
, m_url_boadbase( url_boardbase )
{
}

Expand Down
6 changes: 3 additions & 3 deletions src/dbtree/nodetreebase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ enum
using namespace DBTREE;


NodeTreeBase::NodeTreeBase( const std::string& url, const std::string& modified )
NodeTreeBase::NodeTreeBase( const std::string& url, const std::string& date_modified )
: SKELETON::Loadable()
, m_url( url )
, m_resume( RESUME_NO )
, m_heap( SIZE_OF_HEAP )
{
set_date_modified( modified );
set_date_modified( date_modified );

// ルートヘッダ作成。中は空。
m_id_header = -1; // ルートヘッダIDが 0 になるように -1
Expand Down Expand Up @@ -116,7 +116,7 @@ NodeTreeBase::NodeTreeBase( const std::string& url, const std::string& modified
}

#ifdef _DEBUG
std::cout << "NodeTreeBase::NodeTreeBase url = " << m_url << " modified = " << get_date_modified()
std::cout << "NodeTreeBase::NodeTreeBase url = " << m_url << " date_modified = " << get_date_modified()
<< " noname = " << m_default_noname << std::endl;
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/dbtree/nodetreebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ namespace DBTREE
// m_buffer_write に作成した文字列をセットする
void parse_write( std::string_view str, const std::size_t max_lng_write );

bool check_anchor( const int mode, const char* str_in, int& n, std::string& str_out, std::string& str_link,
bool check_anchor( const int mode, const char* str_in, int& n_in, std::string& str_out, std::string& str_link,
ANCINFO* ancinfo ) const;
/// リンクが現れたかチェックして文字列を取得する関数
int check_link( const char* str_in, int& lng_in, std::string& str_text, std::string& str_link ) const;
Expand Down
4 changes: 2 additions & 2 deletions src/dbtree/root.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ void Root::load_etc()
//
// 外部板追加
//
bool Root::add_etc( const std::string& url, const std::string& name, const std::string& basicauth, const std::string& boardid )
bool Root::add_etc( const std::string& url, const std::string& name, const std::string& basicauth, const std::string& id )
{
#ifdef _DEBUG
std::cout << "Root::add_etc url = " << url << " name = " << name
Expand All @@ -1199,7 +1199,7 @@ bool Root::add_etc( const std::string& url, const std::string& name, const std::
info.url = url;
info.name = name;
info.basicauth = basicauth;
info.boardid = boardid;
info.boardid = id;

if( set_board( info.url, info.name, info.basicauth ) )
{
Expand Down
4 changes: 2 additions & 2 deletions src/dbtree/ruleloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

using namespace DBTREE;

RuleLoader::RuleLoader( const std::string& url_boadbase )
RuleLoader::RuleLoader( const std::string& url_boardbase )
: SKELETON::TextLoader()
, m_url_boadbase( url_boadbase )
, m_url_boadbase( url_boardbase )
{
#ifdef _DEBUG
std::cout << "RuleLoader::RuleLoader : " << RuleLoader::get_url() << std::endl;
Expand Down
4 changes: 2 additions & 2 deletions src/dbtree/settingloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

using namespace DBTREE;

SettingLoader::SettingLoader( const std::string& url_boadbase )
SettingLoader::SettingLoader( const std::string& url_boardbase )
: SKELETON::TextLoader()
, m_url_boadbase( url_boadbase )
, m_url_boadbase( url_boardbase )
{
#ifdef _DEBUG
std::cout << "SettingLoader::SettingLoader : " << m_url_boadbase << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion src/jdlib/jdsocket.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ namespace JDLIB
/// @brief タイムアウト時間 (単位は秒) を設定する
void set_timeout( long timeout ) { m_tout = timeout; }

bool connect( const std::string& host, const std::string& port, const bool use_ipv6 );
bool connect( const std::string& hostname, const std::string& port, const bool use_ipv6 );
void close();

int write( const char* buf, const std::size_t bufsize );
Expand Down
14 changes: 7 additions & 7 deletions src/jdlib/misccharcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,25 +194,25 @@ bool MISC::is_eucjp( std::string_view input, std::size_t read_byte )
*
* エスケープシーケンス(ESC = \\x1B)の有無と該当しないバイトが含まれるかチェックする。
* 呼び出し元の処理のため空文字列に対する返り値は他の`is_*`関数と逆(false)になっている。
* @param[in] input 入力
* @param[in,out] byte チェックを開始する位置、チェックを打ち切った位置を返す
* @param[in] input 入力
* @param[in,out] read_byte チェックを開始する位置、チェックを打ち切った位置を返す
* @return
* - ESCを見つけたらtrue
* - 0x80以上を見つけたらfalse
* - 空文字列またはASCIIのみならfalse
*/
bool MISC::is_jis( std::string_view input, std::size_t& byte )
bool MISC::is_jis( std::string_view input, std::size_t& read_byte )
{
if( input.empty() ) return false;

while( byte < input.size() && byte < CHECK_LIMIT )
while( read_byte < input.size() && read_byte < CHECK_LIMIT )
{
// ESCが出現したか否かだけで判断
if( JIS_ESC_SEQ_START( input[ byte ] ) ) return true;
if( JIS_ESC_SEQ_START( input[ read_byte ] ) ) return true;
// JISに該当しないコード 0x80〜
else if( ! CTRL_AND_ASCII_RANGE( input[ byte ] ) ) return false;
else if( ! CTRL_AND_ASCII_RANGE( input[ read_byte ] ) ) return false;

++byte;
++read_byte;
}

// ループが終了していたら制御文字かアスキー
Expand Down
4 changes: 2 additions & 2 deletions src/jdlib/miscgtk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ std::string MISC::color_to_str( const Gdk::RGBA& rgba )
//
// 入力文字列は大文字小文字を区別しない
// 未知のキーワードや不正な値は変換して返す
std::string MISC::htmlcolor_to_str( const std::string& _htmlcolor )
std::string MISC::htmlcolor_to_str( const std::string& htmlcolor_ )
{
std::string htmlcolor = MISC::tolower_str( _htmlcolor );
std::string htmlcolor = MISC::tolower_str( htmlcolor_ );

if( htmlcolor[0] != '#' ) {
const color_map key{ htmlcolor.c_str(), nullptr };
Expand Down
2 changes: 1 addition & 1 deletion src/jdlib/miscgtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace MISC
std::string color_to_str( const Gdk::RGBA& rgba );

// htmlカラー (#ffffffなど) -> 16進数表記の文字列
std::string htmlcolor_to_str( const std::string& htmlcolor );
std::string htmlcolor_to_str( const std::string& htmlcolor_ );

// Gdk::RGBA -> int 変換
guint32 color_to_int( const Gdk::RGBA& color );
Expand Down
2 changes: 1 addition & 1 deletion src/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@ void SESSION::set_full_win_main( const bool set ){ full_win_main = set; }
bool SESSION::is_dialog_shown(){ return dialog_shown; }
void SESSION::set_dialog_shown( const bool set ){ dialog_shown = set; }

void SESSION::set_show_sidebar( const bool showurl ){ win_show_sidebar = showurl; }
void SESSION::set_show_sidebar( const bool showbar ){ win_show_sidebar = showbar; }


// メインウィンドウのペインの敷居の位置
Expand Down
12 changes: 6 additions & 6 deletions src/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,13 @@ namespace SESSION

// 各window が最大化されているか
bool is_maximized_win_main(); // メインウィンドウ
void set_maximized_win_main( const bool maximized );
void set_maximized_win_main( const bool set );

bool is_maximized_win_img(); // 画像ウィンドウ
void set_maximized_win_img( const bool set );

bool is_maximized_win_mes(); // 書き込みウィンドウ
void set_maximized_win_mes( const bool maximized );
void set_maximized_win_mes( const bool set );


// 各window が最小化されているか
Expand Down Expand Up @@ -308,7 +308,7 @@ namespace SESSION
// サイドバーのツールバー項目
const std::string& get_items_sidebar_toolbar_str();
std::string get_items_sidebar_toolbar_default_str();
void set_items_sidebar_toolbar_str( const std::string& items );
void set_items_sidebar_toolbar_str( const std::string& items_str );
int get_item_sidebar_toolbar( const int num );

// メインツールバーの項目
Expand All @@ -332,19 +332,19 @@ namespace SESSION
// スレ一覧のツールバー項目
const std::string& get_items_board_toolbar_str();
std::string get_items_board_toolbar_default_str();
void set_items_board_toolbar_str( const std::string& items );
void set_items_board_toolbar_str( const std::string& items_str );
int get_item_board_toolbar( const int num );

// 書き込みビューのツールバー項目
const std::string& get_items_msg_toolbar_str();
std::string get_items_msg_toolbar_default_str();
void set_items_msg_toolbar_str( const std::string& items );
void set_items_msg_toolbar_str( const std::string& items_str );
int get_item_msg_toolbar( const int num );

// スレ一覧の列項目
const std::string& get_items_board_col_str();
std::string get_items_board_col_default_str();
void set_items_board_col_str( const std::string& items );
void set_items_board_col_str( const std::string& items_str );
int get_item_board_col( const int num );

// スレ一覧のコンテキストメニュー項目
Expand Down
4 changes: 2 additions & 2 deletions src/skeleton/dragnote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ int DragableNoteBook::get_tabicon( const int page )
//
// タブにアイコンをセットする
//
void DragableNoteBook::set_tabicon( const std::string& iconname, const int page, const int id )
void DragableNoteBook::set_tabicon( const std::string& iconname, const int page, const int icon_id )
{
SKELETON::TabLabel* tablabel = m_notebook_tab.get_tablabel( page );
if( tablabel && id != ICON::NONE ) tablabel->set_id_icon( id );
if( tablabel && icon_id != ICON::NONE ) tablabel->set_id_icon( icon_id );
}


Expand Down
4 changes: 2 additions & 2 deletions src/skeleton/dragnote.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ namespace SKELETON

int append_page( const std::string& url, Gtk::Widget& child );
int insert_page( const std::string& url, Gtk::Widget& child, int page );
void remove_page( const int page, const bool adust_tab );
void remove_page( const int page, const bool adjust_tab );

// ツールバー関係
// 各Adminクラスの virtual void show_toolbar()でツールバーを作成してappend_toolbar()で登録する
Expand All @@ -144,7 +144,7 @@ namespace SKELETON

// タブのアイコン取得/セット
int get_tabicon( const int page );
void set_tabicon( const std::string& iconname, const int page, const int icon );
void set_tabicon( const std::string& iconname, const int page, const int icon_id );

// ドラッグ可/不可切り替え(デフォルト false );
void set_dragable( bool dragable ){ m_dragable = dragable; }
Expand Down
2 changes: 1 addition & 1 deletion src/xml/dom.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ namespace XML
void append_treestore( Glib::RefPtr< Gtk::TreeStore >& treestore,
SKELETON::EditColumns& columns,
std::list< Gtk::TreePath >& list_path_expand,
const Gtk::TreeModel::Row& parnet = Gtk::TreeModel::Row() ) const;
const Gtk::TreeModel::Row& parent = Gtk::TreeModel::Row() ) const;

public:

Expand Down

0 comments on commit d44c393

Please sign in to comment.