r4382844.cc
来自「Mac OS X 10.4.9 for x86 Source Code gcc」· CC 代码 · 共 82 行
CC
82 行
/* APPLE LOCAL file Radar 4382844 *//* { dg-do compile } */#include <vector>struct vec3 { inline vec3() : x(0), y(0), z(0) {} inline vec3(const vec3 &V) : x(V.x), y(V.y), z(V.z) {} union { struct { float x,y,z; }; float v[3]; };};namespace WorldEngine{class Water { protected: struct Patch; typedef std::vector< Patch > PatchVec; public: Water( void ); virtual void aboutToBeDeleted( void ); protected: virtual ~Water( void ){} struct Patch { int indices[4]; bool under[4]; vec3 normal0; Patch( void ) { for ( int i = 0; i < 4; i++ ) { } } Patch( const Patch &c ): normal0( c.normal0 ) { for ( int i = 0; i < 4; i++ ) { indices[i] = c.indices[i]; } } }; class EdgeCell { public: PatchVec _patches; EdgeCell( ); virtual void aboutToBeDeleted( Patch p1); };};}extern void foo (int i);namespace WorldEngine{Water::Water( void ){}Water::EdgeCell::EdgeCell( ){}void Water::EdgeCell::aboutToBeDeleted(Patch p1){ PatchVec::iterator it( _patches.begin() ), end( _patches.end() ); for ( ; it != end; ++it ) { Patch p( *it ); foo (p.indices[3]); }}}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?