Skip to content

Commit

Permalink
chore: Remove unused #includes (endless-sky#9564)
Browse files Browse the repository at this point in the history
  • Loading branch information
tibetiroka authored Nov 21, 2023
1 parent 9ca1df6 commit f0fe666
Show file tree
Hide file tree
Showing 13 changed files with 5 additions and 18 deletions.
1 change: 0 additions & 1 deletion source/BoardingPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "ShipEvent.h"
#include "ShipInfoPanel.h"
#include "System.h"
#include "text/truncate.hpp"
#include "UI.h"

#include <algorithm>
Expand Down
1 change: 0 additions & 1 deletion source/ClickZone.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "Point.h"
#include "Rectangle.h"

#include <cmath>
#include <utility>


Expand Down
1 change: 0 additions & 1 deletion source/HailPanel.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "Panel.h"

#include "Angle.h"
#include "Point.h"

#include <cstdint>
#include <memory>
Expand Down
2 changes: 0 additions & 2 deletions source/Hazard.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.

#include "Weapon.h"

#include "Point.h"


// Hazards are environmental effects created within systems. They are able to create
// visual effects and damage or apply status effects to any ships within the system
Expand Down
1 change: 0 additions & 1 deletion source/MapDetailPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "text/layout.hpp"
#include "MapOutfitterPanel.h"
#include "MapShipyardPanel.h"
#include "pi.h"
#include "Planet.h"
#include "PlayerInfo.h"
#include "PointerShader.h"
Expand Down
1 change: 0 additions & 1 deletion source/MenuPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "PlayerInfo.h"
#include "Point.h"
#include "PreferencesPanel.h"
#include "Rectangle.h"
#include "Ship.h"
#include "Sprite.h"
#include "StarField.h"
Expand Down
1 change: 0 additions & 1 deletion source/MissionPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "GameData.h"
#include "Information.h"
#include "Interface.h"
#include "text/layout.hpp"
#include "LineShader.h"
#include "Mission.h"
#include "Planet.h"
Expand Down
1 change: 0 additions & 1 deletion source/OutfitterPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "text/Format.h"
#include "GameData.h"
#include "Hardpoint.h"
#include "text/layout.hpp"
#include "Mission.h"
#include "Outfit.h"
#include "Planet.h"
Expand Down
1 change: 0 additions & 1 deletion source/PreferencesPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "GameData.h"
#include "Information.h"
#include "Interface.h"
#include "text/layout.hpp"
#include "Plugins.h"
#include "Preferences.h"
#include "Screen.h"
Expand Down
2 changes: 0 additions & 2 deletions source/SpaceportPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#include "SpaceportPanel.h"

#include "text/alignment.hpp"
#include "Color.h"
#include "text/FontSet.h"
#include "GameData.h"
#include "Interface.h"
#include "News.h"
#include "Planet.h"
#include "PlayerInfo.h"
#include "Point.h"
#include "Random.h"
#include "UI.h"

Expand Down
1 change: 0 additions & 1 deletion source/comparators/BySeriesAndIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ this program. If not, see <https://www.gnu.org/licenses/>.
#ifndef BY_SERIES_AND_INDEX_H_
#define BY_SERIES_AND_INDEX_H_

#include "../CategoryList.h"
#include "../CategoryTypes.h"
#include "../GameData.h"
#include "../Outfit.h"
Expand Down
8 changes: 4 additions & 4 deletions source/text/WrappedText.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ int WrappedText::Height() const
// Return the width of the longest line of the wrapped text.
int WrappedText::LongestLineWidth() const
{
return longesLineWidth;
return longestLineWidth;
}


Expand Down Expand Up @@ -213,7 +213,7 @@ void WrappedText::SetText(const char *it, size_t length)
void WrappedText::Wrap()
{
height = 0;
longesLineWidth = 0;
longestLineWidth = 0;

if(text.empty() || !font)
return;
Expand Down Expand Up @@ -323,8 +323,8 @@ void WrappedText::AdjustLine(size_t &lineBegin, int &lineWidth, bool isEnd)
int wordCount = static_cast<int>(words.size() - lineBegin);
int extraSpace = wrapWidth - lineWidth;

if(lineWidth > longesLineWidth)
longesLineWidth = lineWidth;
if(lineWidth > longestLineWidth)
longestLineWidth = lineWidth;

// Figure out how much space is left over. Depending on the alignment, we
// will add that space to the left, to the right, to both sides, or to the
Expand Down
2 changes: 1 addition & 1 deletion source/text/WrappedText.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class WrappedText {
std::vector<Word> words;
int height = 0;

int longesLineWidth = 0;
int longestLineWidth = 0;
};


Expand Down

0 comments on commit f0fe666

Please sign in to comment.