Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!
Werbeanzeige
C-/C++-Quelltext |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
class base_problem { public: virtual Real _flux(const Real u)=0; virtual Real _waveSpeed(const Real u)=0; }; class Burgers : public base_problem { Real _flux(const Real u) {return 0.5*u*u;}; Real _waveSpeed(const Real u) {return u;}; }; Real _getFlux(base_problem* bf, const Real u) { return(bf->_flux(u)); } Real _getWaveSpeed(base_problem* bf, const Real u) { return(bf->_waveSpeed(u)); } |
Quellcode |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
for c8 in ( select t210x.cont_1_id v211, t212_213.obj_class_id v213, t210x.asset_id v214, t215_216.obj_class_id v216 from obj_class2 t215_216, obj t215, obj_asset_add t215x, obj_name_intl t215n, obj_class2 t212_213, obj t212, obj_cont_add t212x, obj_name_intl t212n, doc_stex_v t210x, doc t210 where t210x.id (+) = t210.id and t210.id = coalesce(to_number(id#31), 0) and t212n.obj_id = coalesce(to_number(t210x.cont_1_id), 0) and t212.id (+) = t212n.obj_id and t212x.obj_id (+) = t212.id and t212_213.obj_classif_id (+) = 120 and t212_213.obj_id (+) = t212.id and f#213#1 between t212_213.start_date (+) and t212_213.end_date (+) and t215n.obj_id = coalesce(to_number(t210x.asset_id), 0) and t215.id (+) = t215n.obj_id and t215x.obj_id (+) = t215.id and t215_216.obj_classif_id (+) = 117 and t215_216.obj_id (+) = t215.id and f#216#1 between t215_216.start_date (+) and t215_216.end_date (+) ) loop [...] end loop; |
das ist optimiert...Sieht aus wie zwischen Rewrite und vor der Optimierungsphase.
Quellcode |
|
1 2 3 4 5 6 7 |
if (!collide) { for (var i:int = 0; i < Blocklist.length; i++ ) { collide ? Blocklist[i].Settle() : Blocklist[i].Move(xOffset, yOffset); } } |
Quellcode |
|
1 |
return(settle && yOffset > 0 ? true : false); |
Werbeanzeige