Skip to content

Commit

Permalink
Loadable: Add const qualifier to member function (JDimproved#1296)
Browse files Browse the repository at this point in the history
メンバーを変更しないメンバー関数にconstを付けます。
  • Loading branch information
ma8ma committed Dec 2, 2023
1 parent 7de381a commit 69c567b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/skeleton/loadable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,12 @@ bool Loadable::is_loading() const
}


//
// 更新時刻
//
time_t Loadable::get_time_modified()
/** @brief 更新時刻を返す
*
* @details 更新時刻のデータが無い、または形式が不正のときは現在時刻の600秒前を返す。
* @return 更新時刻を表すエポックから経過した秒数
*/
std::time_t Loadable::get_time_modified() const
{
time_t time_out;
time_out = MISC::datetotime( m_date_modified );
Expand Down
4 changes: 2 additions & 2 deletions src/skeleton/loadable.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ namespace SKELETON

const std::string& get_contenttype() const { return m_contenttype; }

const std::list< std::string >& cookies() { return m_cookies; }
const std::list< std::string >& cookies() const { return m_cookies; }
const std::string& location() const { return m_location; }

size_t total_length() const { return m_total_length; }
Expand All @@ -121,7 +121,7 @@ namespace SKELETON
void set_current_length( int length ){ m_current_length = length; }

// 更新時刻関係
time_t get_time_modified();
std::time_t get_time_modified() const;
const std::string& get_date_modified() const { return m_date_modified; }
void set_date_modified( const std::string& date ){ m_date_modified = date; }

Expand Down

0 comments on commit 69c567b

Please sign in to comment.