Browse Source

Cleaned up Clang compilation warnings for unused variables.

David Piuva 4 năm trước cách đây
mục cha
commit
d332b9dbd3

+ 1 - 1
Source/DFPSR/api/bufferAPI.cpp

@@ -52,7 +52,6 @@ public:
 
 // buffer_alignment must be a power of two for buffer_alignment_mask to work
 static const int buffer_alignment = 16;
-static const uintptr_t buffer_alignment_mask = ~((uintptr_t)(buffer_alignment - 1));
 
 // If this C++ version additionally includes the C11 features then we may assume that aligned_alloc is available
 #ifdef _ISOC11_SOURCE
@@ -63,6 +62,7 @@ static const uintptr_t buffer_alignment_mask = ~((uintptr_t)(buffer_alignment -
 		return allocation;
 	}
 #else
+	static const uintptr_t buffer_alignment_mask = ~((uintptr_t)(buffer_alignment - 1));
 	// Allocate data of newSize and write the corresponding destructor function to targetDestructor
 	static uint8_t* buffer_allocate(int64_t newSize, std::function<void(uint8_t *)>& targetDestructor) {
 		uintptr_t padding = buffer_alignment - 1;

+ 0 - 3
Source/DFPSR/gui/components/Label.h

@@ -41,9 +41,6 @@ public:
 	void declareAttributes(StructureDefinition &target) const override;
 	Persistent* findAttribute(const ReadableString &name) override;
 private:
-	// Temporary
-	bool pressed = false;
-	bool inside = false;
 	// Given from the style
 	RasterFont font;
 	void completeAssets();

+ 0 - 1
Source/DFPSR/gui/components/ListBox.cpp

@@ -60,7 +60,6 @@ static const int textBorderLeft = 6;
 static const int textBorderTop = 4;
 static const int scrollWidth = 16; // The width of the scroll bar
 static const int scrollEndHeight = 14; // The height of upper and lower scroll buttons
-static const int border = 1; // Scroll-bar edge thickness
 
 void ListBox::generateGraphics() {
 	int width = this->location.width();