Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/fuselage/CCPACSFuselageProfiles.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
* Copyright (C) 2007-2013 German Aerospace Center (DLR/SC)
*
* Created: 2010-08-13 Markus Litz <Markus.Litz@dlr.de>
Expand Down Expand Up @@ -33,8 +33,8 @@ CCPACSFuselageProfiles::CCPACSFuselageProfiles(CCPACSProfiles* parent, CTiglUIDM
// Invalidates internal state
void CCPACSFuselageProfiles::Invalidate(const boost::optional<std::string>& source) const
{
for (int i = 1; i < GetProfileCount(); i++) {
GetProfile(i).Invalidate(source);
for (int i = 1; i < GetFuselageProfileCount(); i++) {
GetFuselageProfile(i).Invalidate(source);
}
}

Expand Down Expand Up @@ -85,9 +85,9 @@ void CCPACSFuselageProfiles::DeleteProfile( std::string uid )
}

// Returns the total count of fuselage profiles in this configuration
int CCPACSFuselageProfiles::GetProfileCount() const
size_t CCPACSFuselageProfiles::GetProfileCount() const
{
return static_cast<int>(m_fuselageProfiles.size());
return GetFuselageProfileCount();
}

// Returns the fuselage profile for a given uid.
Expand All @@ -109,12 +109,12 @@ CCPACSFuselageProfile& CCPACSFuselageProfiles::GetProfile(std::string uid)
// Returns the fuselage profile for a given index
const CCPACSFuselageProfile& CCPACSFuselageProfiles::GetProfile(size_t index) const
{
return static_cast<CCPACSFuselageProfile&>(*m_fuselageProfiles[index]);
return static_cast<const CCPACSFuselageProfile&>(GetFuselageProfile(index));
}

CCPACSFuselageProfile& CCPACSFuselageProfiles::GetProfile(size_t index)
{
return static_cast<CCPACSFuselageProfile&>(*m_fuselageProfiles[index]);
return static_cast<CCPACSFuselageProfile&>(GetFuselageProfile(index));
}

} // end namespace tigl
4 changes: 3 additions & 1 deletion src/fuselage/CCPACSFuselageProfiles.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,16 @@ class CCPACSFuselageProfiles : public generated::CPACSFuselageProfiles
TIGL_EXPORT void DeleteProfile(std::string uid );

// Returns the total count of fuselage profiles in this configuration
TIGL_EXPORT int GetProfileCount() const;
TIGL_EXPORT size_t GetProfileCount() const;

// Returns the fuselage profile for a given index.
TIGL_EXPORT const CCPACSFuselageProfile& GetProfile(size_t index) const;

TIGL_EXPORT CCPACSFuselageProfile& GetProfile(size_t index);

// Returns the fuselage profile for a given uid.
TIGL_EXPORT const CCPACSFuselageProfile& GetProfile(std::string uid) const;

TIGL_EXPORT CCPACSFuselageProfile& GetProfile(std::string uid);

// Invalidates internal state
Expand Down
Loading