Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 239330 | Differences between
and this patch

Collapse All | Expand All

(-)ktechlab-0.3.orig/src/cells.h (+3 lines)
Lines 52-57 Link Here
52
/**
52
/**
53
@author David Saxton
53
@author David Saxton
54
*/
54
*/
55
56
typedef unsigned int uint;
57
55
class Cells
58
class Cells
56
{
59
{
57
public:
60
public:
(-)ktechlab-0.3.orig/src/cnitem.cpp (-2 / +2 lines)
Lines 65-72 Link Here
65
65
66
bool CNItem::preResize( QRect sizeRect )
66
bool CNItem::preResize( QRect sizeRect )
67
{
67
{
68
	if ( (std::abs(sizeRect.width()) < minimumSize().width()) ||
68
	if ( (std::abs((double)sizeRect.width()) < minimumSize().width()) ||
69
		 (std::abs(sizeRect.height()) < minimumSize().height()) )
69
		 (std::abs((double)sizeRect.height()) < minimumSize().height()) )
70
		return false;
70
		return false;
71
	
71
	
72
	updateConnectorPoints(false);
72
	updateConnectorPoints(false);
(-)ktechlab-0.3.orig/src/conrouter.cpp (-2 / +2 lines)
Lines 492-498 Link Here
492
	{
492
	{
493
		for ( int x = start; x!=end; x+=dd )
493
		for ( int x = start; x!=end; x+=dd )
494
		{
494
		{
495
			if ( std::abs(x-start)>1 && std::abs(x-end)>1 && ((*cells)[x][y].CIpenalty > maxCIScore || (*cells)[x][y].Cpenalty > maxConScore) )
495
			if ( std::abs((double)(x-start))>1 && std::abs((double)(x-end))>1 && ((*cells)[x][y].CIpenalty > maxCIScore || (*cells)[x][y].Cpenalty > maxConScore) )
496
			{
496
			{
497
				return false;
497
				return false;
498
			} else {
498
			} else {
Lines 504-510 Link Here
504
	{
504
	{
505
		for ( int y = start; y!=end; y+=dd )
505
		for ( int y = start; y!=end; y+=dd )
506
		{
506
		{
507
			if ( std::abs(y-start)>1 && std::abs(y-end)>1 && ((*cells)[x][y].CIpenalty > maxCIScore || (*cells)[x][y].Cpenalty > maxConScore) )
507
			if ( std::abs((double)(y-start))>1 && std::abs((double)(y-end))>1 && ((*cells)[x][y].CIpenalty > maxCIScore || (*cells)[x][y].Cpenalty > maxConScore) )
508
			{
508
			{
509
				return false;
509
				return false;
510
			} else {
510
			} else {
(-)ktechlab-0.3.orig/src/electronics/simulation/matrix.cpp (-1 / +1 lines)
Lines 288-294 Link Here
288
Map::Map( const uint size )
288
Map::Map( const uint size )
289
{
289
{
290
	m_size = size;
290
	m_size = size;
291
	m_map = new ETMap( m_size, m_size );
291
	m_map = new ETMap( m_size );
292
	reset();
292
	reset();
293
}
293
}
294
294
(-)ktechlab-0.3.orig/src/nodegroup.cpp (-3 / +4 lines)
Lines 16-21 Link Here
16
16
17
#include <kdebug.h>
17
#include <kdebug.h>
18
#include <assert.h>
18
#include <assert.h>
19
#include <cmath>
19
20
20
NodeGroup::NodeGroup( ICNDocument *icnDocument, const char *name )
21
NodeGroup::NodeGroup( ICNDocument *icnDocument, const char *name )
21
	: QObject( icnDocument, name )
22
	: QObject( icnDocument, name )
Lines 274-280 Link Here
274
		{
275
		{
275
			if ( *it1 != *it2 && (*it1)->y() == (*it2)->y() && canRoute( *it1, *it2 ) )
276
			if ( *it1 != *it2 && (*it1)->y() == (*it2)->y() && canRoute( *it1, *it2 ) )
276
			{
277
			{
277
				const int distance = std::abs(int( (*it1)->x()-(*it2)->x() ));
278
				const int distance = std::abs((double)( (*it1)->x()-(*it2)->x() ));
278
				if ( distance < shortest )
279
				if ( distance < shortest )
279
				{
280
				{
280
					shortest = distance;
281
					shortest = distance;
Lines 296-302 Link Here
296
		{
297
		{
297
			if ( *it1 != *it2 && (*it1)->x() == (*it2)->x() && canRoute( *it1, *it2 ) )
298
			if ( *it1 != *it2 && (*it1)->x() == (*it2)->x() && canRoute( *it1, *it2 ) )
298
			{
299
			{
299
				const int distance = std::abs(int( (*it1)->y()-(*it2)->y() ));
300
				const int distance = std::abs((double)( (*it1)->y()-(*it2)->y() ));
300
				if ( distance < shortest )
301
				if ( distance < shortest )
301
				{
302
				{
302
					shortest = distance;
303
					shortest = distance;
Lines 320-326 Link Here
320
			{
321
			{
321
				const int dx = (int)((*it1)->x()-(*it2)->x());
322
				const int dx = (int)((*it1)->x()-(*it2)->x());
322
				const int dy = (int)((*it1)->y()-(*it2)->y());
323
				const int dy = (int)((*it1)->y()-(*it2)->y());
323
				const int distance = std::abs(dx) + std::abs(dy);
324
				const int distance = std::abs((double)dx) + std::abs((double)dy);
324
				if ( distance < shortest )
325
				if ( distance < shortest )
325
				{
326
				{
326
					shortest = distance;
327
					shortest = distance;

Return to bug 239330