Skip to content

Commit 4e84007

Browse files
author
Clement Champetier
committed
ProfileLoader: getters to profiles are const functions
1 parent fe788c9 commit 4e84007

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/AvTranscoder/profile/ProfileLoader.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,16 +102,16 @@ void ProfileLoader::loadProfile( const Profile& profile )
102102
throw std::runtime_error( "Warning: The profile " + profile.find( constants::avProfileIdentificator )->second + " is invalid. It will not be loaded." );
103103
}
104104

105-
const ProfileLoader::Profiles& ProfileLoader::getProfiles()
105+
const ProfileLoader::Profiles& ProfileLoader::getProfiles() const
106106
{
107107
return _profiles;
108108
}
109109

110-
ProfileLoader::Profiles ProfileLoader::getFormatProfiles()
110+
ProfileLoader::Profiles ProfileLoader::getFormatProfiles() const
111111
{
112112
Profiles profiles;
113113

114-
for( Profiles::iterator it = _profiles.begin(); it != _profiles.end(); ++it )
114+
for( Profiles::const_iterator it = _profiles.begin(); it != _profiles.end(); ++it )
115115
{
116116
if( (*it).find( constants::avProfileType )->second == constants::avProfileTypeFormat )
117117
profiles.push_back( *it );
@@ -120,11 +120,11 @@ ProfileLoader::Profiles ProfileLoader::getFormatProfiles()
120120
return profiles;
121121
}
122122

123-
ProfileLoader::Profiles ProfileLoader::getVideoProfiles()
123+
ProfileLoader::Profiles ProfileLoader::getVideoProfiles() const
124124
{
125125
Profiles profiles;
126126

127-
for( Profiles::iterator it = _profiles.begin(); it != _profiles.end(); ++it )
127+
for( Profiles::const_iterator it = _profiles.begin(); it != _profiles.end(); ++it )
128128
{
129129
if( (*it).find( constants::avProfileType )->second == constants::avProfileTypeVideo )
130130
profiles.push_back( *it );
@@ -133,11 +133,11 @@ ProfileLoader::Profiles ProfileLoader::getVideoProfiles()
133133
return profiles;
134134
}
135135

136-
ProfileLoader::Profiles ProfileLoader::getAudioProfiles()
136+
ProfileLoader::Profiles ProfileLoader::getAudioProfiles() const
137137
{
138138
Profiles profiles;
139139

140-
for( Profiles::iterator it = _profiles.begin(); it != _profiles.end(); ++it )
140+
for( Profiles::const_iterator it = _profiles.begin(); it != _profiles.end(); ++it )
141141
{
142142
if( (*it).find( constants::avProfileType )->second == constants::avProfileTypeAudio )
143143
profiles.push_back( *it );
@@ -159,7 +159,7 @@ ProfileLoader::Profile& ProfileLoader::getProfile( const std::string& avProfileI
159159
}
160160

161161

162-
bool ProfileLoader::checkFormatProfile( const Profile& profileToCheck )
162+
bool ProfileLoader::checkFormatProfile( const Profile& profileToCheck ) const
163163
{
164164
bool isValid = true;
165165

@@ -174,7 +174,7 @@ bool ProfileLoader::checkFormatProfile( const Profile& profileToCheck )
174174
return isValid;
175175
}
176176

177-
bool ProfileLoader::checkVideoProfile( const Profile& profileToCheck )
177+
bool ProfileLoader::checkVideoProfile( const Profile& profileToCheck ) const
178178
{
179179
bool isValid = true;
180180

@@ -189,7 +189,7 @@ bool ProfileLoader::checkVideoProfile( const Profile& profileToCheck )
189189
return isValid;
190190
}
191191

192-
bool ProfileLoader::checkAudioProfile( const Profile& profileToCheck )
192+
bool ProfileLoader::checkAudioProfile( const Profile& profileToCheck ) const
193193
{
194194
bool isValid = true;
195195

src/AvTranscoder/profile/ProfileLoader.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ class AvExport ProfileLoader
5757
*/
5858
void loadProfile( const Profile& profile );
5959

60-
const Profiles& getProfiles();
60+
const Profiles& getProfiles() const;
6161

62-
Profiles getFormatProfiles();
63-
Profiles getVideoProfiles();
64-
Profiles getAudioProfiles();
62+
Profiles getFormatProfiles() const;
63+
Profiles getVideoProfiles() const;
64+
Profiles getAudioProfiles() const;
6565

6666
Profile& getProfile( const std::string& avProfileIdentificator );
6767

6868
private:
69-
bool checkFormatProfile( const Profile& profileToCheck );
70-
bool checkVideoProfile( const Profile& profileToCheck );
71-
bool checkAudioProfile( const Profile& profileToCheck );
69+
bool checkFormatProfile( const Profile& profileToCheck ) const;
70+
bool checkVideoProfile( const Profile& profileToCheck ) const;
71+
bool checkAudioProfile( const Profile& profileToCheck ) const;
7272

7373
private:
7474
Profiles _profiles;

0 commit comments

Comments
 (0)