Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsanta: fix x86_64 build (well still a hack).
- Loading branch information
Showing
2 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
From c461b0f16302bc3a1a32c0af546e8a866beba55d Mon Sep 17 00:00:00 2001 | ||
From: Jerome Duval <jerome.duval@gmail.com> | ||
Date: Mon, 5 Dec 2016 19:09:51 +0000 | ||
Subject: x86_64 hack. | ||
|
||
|
||
diff --git a/src/CLVEasyItem.cpp b/src/CLVEasyItem.cpp | ||
index a83e74b..4025747 100644 | ||
--- a/src/CLVEasyItem.cpp | ||
+++ b/src/CLVEasyItem.cpp | ||
@@ -68,7 +68,7 @@ CLVEasyItem::~CLVEasyItem() | ||
int num_columns = m_column_types.CountItems(); | ||
for(int column = 0; column < num_columns; column++) | ||
{ | ||
- int32 type = (int32)m_column_types.ItemAt(column); | ||
+ int32 type = (int32)(intptr_t)m_column_types.ItemAt(column); | ||
bool bitmap_is_copy = false; | ||
if(type & CLVColFlagBitmapIsCopy) | ||
bitmap_is_copy = true; | ||
@@ -99,7 +99,7 @@ void CLVEasyItem::PrepListsForSet(int column_index) | ||
if(delete_old) | ||
{ | ||
//Column content exists already so delete the old entries | ||
- int32 old_type = (int32)m_column_types.ItemAt(column_index); | ||
+ int32 old_type = (int32)(intptr_t)m_column_types.ItemAt(column_index); | ||
bool bitmap_is_copy = false; | ||
if(old_type & CLVColFlagBitmapIsCopy) | ||
bitmap_is_copy = true; | ||
@@ -205,7 +205,7 @@ void CLVEasyItem::SetColumnUserTextContent(int column_index, bool truncate, bool | ||
|
||
const char* CLVEasyItem::GetColumnContentText(int column_index) | ||
{ | ||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask; | ||
+ int32 type = ((int32)(intptr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask; | ||
if(type == CLVColStaticText || type == CLVColTruncateText) | ||
return (char*)m_column_content.ItemAt(column_index); | ||
if(type == CLVColTruncateUserText || type == CLVColUserText) | ||
@@ -216,7 +216,7 @@ const char* CLVEasyItem::GetColumnContentText(int column_index) | ||
|
||
const BBitmap* CLVEasyItem::GetColumnContentBitmap(int column_index) | ||
{ | ||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask; | ||
+ int32 type = ((int32)(intptr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask; | ||
if(type != CLVColBitmap) | ||
return NULL; | ||
return (BBitmap*)m_column_content.ItemAt(column_index); | ||
@@ -241,7 +241,7 @@ void CLVEasyItem::DrawItemColumn(BView *owner, BRect item_column_rect, int32 col | ||
if(column_index == -1) | ||
return; | ||
|
||
- int32 type = (int32)m_column_types.ItemAt(column_index); | ||
+ int32 type = (int32)(intptr_t)m_column_types.ItemAt(column_index); | ||
if(type == 0) | ||
return; | ||
bool needs_truncation = false; | ||
@@ -303,7 +303,7 @@ void CLVEasyItem::DrawItemColumn(BView *owner, BRect item_column_rect, int32 col | ||
{ | ||
const BBitmap* bitmap = (BBitmap*)m_column_content.ItemAt(column_index); | ||
BRect bounds = bitmap->Bounds(); | ||
- float horizontal_offset = (float)((int32)m_aux_content.ItemAt(column_index)); | ||
+ float horizontal_offset = (float)((int32)(intptr_t)m_aux_content.ItemAt(column_index)); | ||
if(!right_justify) | ||
{ | ||
item_column_rect.left += horizontal_offset; | ||
@@ -344,8 +344,8 @@ int CLVEasyItem::CompareItems(const CLVListItem *a_Item1, const CLVListItem *a_I | ||
Item2->m_column_types.CountItems() <= KeyColumn) | ||
return 0; | ||
|
||
- int32 type1 = ((int32)Item1->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask; | ||
- int32 type2 = ((int32)Item2->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask; | ||
+ int32 type1 = ((int32)(intptr_t)Item1->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask; | ||
+ int32 type2 = ((int32)(intptr_t)Item2->m_column_types.ItemAt(KeyColumn)) & CLVColTypesMask; | ||
|
||
if(!((type1 == CLVColStaticText || type1 == CLVColTruncateText || type1 == CLVColTruncateUserText || | ||
type1 == CLVColUserText) && (type2 == CLVColStaticText || type2 == CLVColTruncateText || | ||
@@ -425,7 +425,7 @@ void CLVEasyItem::ColumnWidthChanged(int32 column_index, float column_width, Col | ||
other_rect->OffsetBy(width_delta,0); | ||
} | ||
|
||
- int32 type = (int32)m_column_types.ItemAt(column_index); | ||
+ int32 type = (int32)(intptr_t)m_column_types.ItemAt(column_index); | ||
bool right_justify = (type&CLVColFlagRightJustify); | ||
type &= CLVColTypesMask; | ||
BRect invalid; | ||
@@ -487,7 +487,7 @@ void CLVEasyItem::FrameChanged(int32 column_index, BRect new_frame, ColumnListVi | ||
BRect* cached_rect = (BRect*)m_cached_rects.ItemAt(column_index); | ||
if(cached_rect == NULL) | ||
return; | ||
- int32 type = ((int32)m_column_types.ItemAt(column_index)) & CLVColTypesMask; | ||
+ int32 type = ((int32)(intptr_t)m_column_types.ItemAt(column_index)) & CLVColTypesMask; | ||
if(type == CLVColTruncateText) | ||
if(*cached_rect != new_frame) | ||
{ | ||
-- | ||
2.10.2 | ||
|