Skip to content

Commit

Permalink
Add std::nothrow to new calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nschlia committed Oct 1, 2024
1 parent 05d2128 commit e029bd9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/cache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,7 @@ void Cache::close_index()

Cache_Entry* Cache::create_entry(LPVIRTUALFILE virtualfile, const std::string & desttype)
{
//Cache_Entry* cache_entry = new(std::nothrow) Cache_Entry(this, filename);
//Cache_Entry* cache_entry = new (std::nothrow) Cache_Entry(this, filename);
Cache_Entry* cache_entry = Cache_Entry::create(this, virtualfile);
if (cache_entry == nullptr)
{
Expand Down
6 changes: 3 additions & 3 deletions src/ffmpegfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ FFMPEGFS_PARAMS::FFMPEGFS_PARAMS()
, m_decoding_errors(0) // default: ignore errors
, m_min_dvd_chapter_duration(1) // default: 1 second
, m_oldnamescheme(0) // default: new scheme
, m_include_extensions(new MATCHVEC) // default: empty list
, m_hide_extensions(new MATCHVEC) // default: empty list
, m_include_extensions(new (std::nothrow) MATCHVEC) // default: empty list
, m_hide_extensions(new (std::nothrow) MATCHVEC) // default: empty list
, m_win_smb_fix(1) // default: fix enabled
{
}
Expand Down Expand Up @@ -1545,7 +1545,7 @@ static int get_hwaccel_dec_blocked(const std::string & arg, HWACCEL_BLOCKED_MAP

if (*hwaccel_dec_blocked == nullptr)
{
*hwaccel_dec_blocked = new HWACCEL_BLOCKED_MAP;
*hwaccel_dec_blocked = new (std::nothrow) HWACCEL_BLOCKED_MAP;
}

if (!std::getline(data, codec, ':'))
Expand Down

0 comments on commit e029bd9

Please sign in to comment.