various GCC 4 build fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18875 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d67b1efc99
commit
3ec18e87d6
@ -18,6 +18,8 @@
|
||||
#include "CommandStack.h"
|
||||
#include "IconRenderer.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
// constructor
|
||||
CanvasView::CanvasView(BRect frame)
|
||||
: StateView(frame, "canvas view", B_FOLLOW_ALL,
|
||||
|
@ -22,6 +22,7 @@
|
||||
//
|
||||
#include "RWLocker.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
class EventFilter : public BMessageFilter {
|
||||
public:
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
#include "support.h"
|
||||
|
||||
using std::nowthrow;
|
||||
using std::nothrow;
|
||||
|
||||
// constructor
|
||||
Property::Property(uint32 identifier)
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
using std::nowthrow;
|
||||
using std::nothrow;
|
||||
|
||||
// constructor
|
||||
Int64Property::Int64Property(uint32 identifier, int64 value)
|
||||
|
@ -93,7 +93,7 @@ write_string(BPositionIO* stream, BString& string)
|
||||
|
||||
// append_float
|
||||
void
|
||||
append_float(BString& string, float n, int32 maxDigits = 4)
|
||||
append_float(BString& string, float n, int32 maxDigits)
|
||||
{
|
||||
int32 rounded = n >= 0.0 ? (int32)fabs(floorf(n)) : (int32)fabs(ceilf(n));
|
||||
|
||||
|
@ -27,12 +27,12 @@ constrain(float& value, float min, float max)
|
||||
// constrain_int32_0_255_asm
|
||||
inline int32
|
||||
constrain_int32_0_255_asm(int32 value) {
|
||||
asm("movl $0, %%ecx;
|
||||
movl $255, %%edx;
|
||||
cmpl %%ecx, %%eax;
|
||||
cmovl %%ecx, %%eax;
|
||||
cmpl %%edx, %%eax;
|
||||
cmovg %%edx, %%eax"
|
||||
asm("movl $0, %%ecx;\n"
|
||||
"movl $255, %%edx;\n"
|
||||
"cmpl %%ecx, %%eax;\n"
|
||||
"cmovl %%ecx, %%eax;\n"
|
||||
"cmpl %%edx, %%eax;\n"
|
||||
"cmovg %%edx, %%eax"
|
||||
: "=a" (value)
|
||||
: "a" (value)
|
||||
: "%ecx", "%edx" );
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include "Util.h"
|
||||
#include "VectorPath.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
static const float kMarkWidth = 14.0;
|
||||
static const float kBorderOffset = 3.0;
|
||||
static const float kTextOffset = 4.0;
|
||||
|
@ -33,6 +33,8 @@
|
||||
#include "Selection.h"
|
||||
#include "Util.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
static const float kMarkWidth = 14.0;
|
||||
static const float kBorderOffset = 3.0;
|
||||
static const float kTextOffset = 4.0;
|
||||
|
@ -19,6 +19,7 @@ class Selection;
|
||||
class Shape;
|
||||
class ShapeContainer;
|
||||
class ShapeListener;
|
||||
class ShapeStyleListener;
|
||||
class Style;
|
||||
class StyleListItem;
|
||||
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "SetGradientCommand.h"
|
||||
#include "Style.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
enum {
|
||||
MSG_SET_COLOR = 'stcl',
|
||||
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include "Document.h"
|
||||
#include "Icon.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
// constructor
|
||||
Exporter::Exporter()
|
||||
: fDocument(NULL),
|
||||
|
@ -235,7 +235,7 @@ FlatIconExporter::_WriteStyles(LittleEndianBuffer& buffer,
|
||||
|
||||
if (styleType == STYLE_TYPE_SOLID_COLOR) {
|
||||
// solid color
|
||||
uint32 color = (uint32&)style->Color();
|
||||
uint32 color = *(uint32*)&style->Color();
|
||||
if (!buffer.Write(color))
|
||||
return B_NO_MEMORY;
|
||||
} else if (styleType == STYLE_TYPE_SOLID_COLOR_NO_ALPHA) {
|
||||
|
@ -28,6 +28,10 @@ class VectorPath;
|
||||
# include <Point.h>
|
||||
# include <hash_set>
|
||||
|
||||
#if __GNUC__ >= 4
|
||||
using __gnu_cxx::hash_set;
|
||||
#endif
|
||||
|
||||
class PointHash {
|
||||
public:
|
||||
int operator()(const BPoint& point) const
|
||||
|
@ -183,7 +183,7 @@ DocumentBuilder::curve4(double x2, double y2, // S, s
|
||||
void
|
||||
DocumentBuilder::elliptical_arc(double rx, double ry, double angle,
|
||||
bool large_arc_flag, bool sweep_flag,
|
||||
double x, double y, bool rel = false)
|
||||
double x, double y, bool rel)
|
||||
{
|
||||
angle = angle / 180.0 * pi;
|
||||
if (rel) {
|
||||
@ -531,7 +531,10 @@ DocumentBuilder::StartGradient(bool radial)
|
||||
"previous gradient (%s) not finished!\n", fCurrentGradient->ID());
|
||||
}
|
||||
|
||||
fCurrentGradient = radial ? new SVGRadialGradient() : new SVGLinearGradient();
|
||||
if (radial)
|
||||
fCurrentGradient = new SVGRadialGradient();
|
||||
else
|
||||
fCurrentGradient = new SVGLinearGradient();
|
||||
|
||||
_AddGradient(fCurrentGradient);
|
||||
}
|
||||
|
@ -14,6 +14,8 @@
|
||||
#include "ChannelTransform.h"
|
||||
#include "VectorPath.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
// constructor
|
||||
TransformPointsCommand::TransformPointsCommand(
|
||||
TransformBox* box,
|
||||
|
@ -34,7 +34,7 @@ SetColorCommand::~SetColorCommand()
|
||||
status_t
|
||||
SetColorCommand::InitCheck()
|
||||
{
|
||||
return fStyle && (uint32&)fStyle->Color() != (uint32&)fColor ?
|
||||
return fStyle && *(uint32*)&fStyle->Color() != *(uint32*)&fColor ?
|
||||
B_OK : B_NO_INIT;
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
#include "ChannelTransform.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
// constructor
|
||||
ResetTransformationCommand::ResetTransformationCommand(
|
||||
Transformable** const objects,
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
#include "ChannelTransform.h"
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
// constructor
|
||||
TransformObjectsCommand::TransformObjectsCommand(
|
||||
TransformBox* box,
|
||||
|
@ -13,6 +13,8 @@
|
||||
|
||||
#include "ViewLayoutItem.h"
|
||||
|
||||
using std::nothrow;
|
||||
using std::swap;
|
||||
|
||||
enum {
|
||||
MAX_COLUMN_ROW_COUNT = 1024,
|
||||
|
@ -111,7 +111,7 @@ BGroupLayoutBuilder::Add(BLayoutItem* item, float weight)
|
||||
// AddGroup
|
||||
BGroupLayoutBuilder&
|
||||
BGroupLayoutBuilder::AddGroup(enum orientation orientation,
|
||||
float spacing = 0.0f, float weight = 1.0f)
|
||||
float spacing, float weight)
|
||||
{
|
||||
if (BGroupLayout* layout = TopLayout()) {
|
||||
BGroupView* group = new(nothrow) BGroupView(orientation, spacing);
|
||||
@ -136,7 +136,7 @@ BGroupLayoutBuilder::End()
|
||||
|
||||
// AddGlue
|
||||
BGroupLayoutBuilder&
|
||||
BGroupLayoutBuilder::AddGlue(float weight = 1.0f)
|
||||
BGroupLayoutBuilder::AddGlue(float weight)
|
||||
{
|
||||
if (BGroupLayout* layout = TopLayout())
|
||||
layout->AddItem(BSpaceLayoutItem::CreateGlue(), weight);
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
#include <new>
|
||||
|
||||
using std::nothrow;
|
||||
|
||||
struct popup_menu_data {
|
||||
BPopUpMenu *object;
|
||||
BWindow *window;
|
||||
|
@ -3,7 +3,11 @@
|
||||
|
||||
#include <vector.h>
|
||||
|
||||
template <class T, class Alloc = alloc>
|
||||
#if __GNUC__ >= 4
|
||||
template <class T, class Alloc = std::allocator<T> >
|
||||
#else
|
||||
template <class T, class Alloc = alloc>
|
||||
#endif
|
||||
class QcUnsortedListSet
|
||||
{
|
||||
public:
|
||||
|
@ -33,14 +33,16 @@ class QcUtility
|
||||
{
|
||||
#if NUMT_IS_DOUBLE
|
||||
private:
|
||||
static double const qcEps = 2.273736754432321e-13; // 2 ** -42
|
||||
#define _QC_EPS 2.273736754432321e-13 // 2 ** -42
|
||||
static double const qcEps = _QC_EPS;
|
||||
static double const qcNearEps = 9.313225746154785e-10; // 2 ** -30
|
||||
static double const qcVaguelyNearEps = 9.5367431640625e-7; // 2 ** -20
|
||||
|
||||
public:
|
||||
/** Highest <tt>numT</tt> <var>x</var> s.t. <tt>IsZero(x)</tt>.
|
||||
This is a positive (non-zero) number iff numT is floating point. */
|
||||
static double const qcMaxZeroVal = qcEps * (1 - DBL_EPSILON / 2);
|
||||
static double const qcMaxZeroVal = _QC_EPS * (1 - DBL_EPSILON / 2);
|
||||
#undef _QC_EPS
|
||||
|
||||
public:
|
||||
//-----------------------------------------------------------------------//
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#include <malloc.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <ByteOrder.h>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
# include <Archivable.h>
|
||||
|
||||
# include "Observable.h"
|
||||
#endif ICON_O_MATIC
|
||||
#endif // ICON_O_MATIC
|
||||
|
||||
#include "Transformable.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user