[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gprof and inline methods
From: |
Konstantin Schauwecker |
Subject: |
Re: gprof and inline methods |
Date: |
Thu, 28 Oct 2004 08:07:16 +0200 |
User-agent: |
KNode/0.7.6 |
E. Robert Tisdale wrote:
> You screwed up.
> It didn't get inlined.
>
> Show us the options that you used to compile your benchmark.
i just use the following options: -p -Wall -pedantic
Here is the full source of my position class:
class HeightmapData
{
public:
// ...
class Position;
// ...
};
class HeightmapData::Position
{
public:
Position(){x=z=0;}
Position(int x, int z){this->x=x;this->z=z;}
Position(const Position& p){x=p.x;z=p.z;}
int getX() const {return x;}
int getZ() const {return z;}
void setX(int x){this->x=x;}
void setZ(int z){this->z=z;}
Position operator + (const Position& p) const
{return Position(x + p.x, z + p.z);}
Position operator - (const Position& p) const
{return Position(x - p.x, z - p.z);}
Position& operator += (const Position& p)
{x+=p.x; z+=p.z; return *this;}
Position& operator -= (const Position& p)
{x-=p.x; z-=p.z; return *this;}
private:
int x;
int z;
};
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000
Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---