Click here to Skip to main content
15,389,177 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Brave Browser & ZDNet Pin
Richard Deeming22-Jun-21 5:08
mveRichard Deeming22-Jun-21 5:08 
GeneralRe: Brave Browser & ZDNet Pin
raddevus22-Jun-21 5:46
mvaraddevus22-Jun-21 5:46 
GeneralRe: Brave Browser & ZDNet Pin
DRHuff22-Jun-21 7:30
MemberDRHuff22-Jun-21 7:30 
GeneralAnalysis paralysis: Painting myself into a corner with generic programming Pin
honey the codewitch22-Jun-21 2:08
mvahoney the codewitch22-Jun-21 2:08 
GeneralRe: Analysis paralysis: Painting myself into a corner with generic programming Pin
Rage22-Jun-21 2:23
professionalRage22-Jun-21 2:23 
GeneralRe: Analysis paralysis: Painting myself into a corner with generic programming Pin
Mircea Neacsu22-Jun-21 2:57
mvaMircea Neacsu22-Jun-21 2:57 
GeneralRe: Analysis paralysis: Painting myself into a corner with generic programming Pin
honey the codewitch22-Jun-21 4:40
mvahoney the codewitch22-Jun-21 4:40 
GeneralRe: Analysis paralysis: Painting myself into a corner with generic programming Pin
englebart25-Jun-21 4:49
professionalenglebart25-Jun-21 4:49 
Seems like a place where

delete this;

could come in handy in the changeMode function but you would have to refactor. Or else have 1 static/global object in memory for each mode and you switch between them.

// global
target = target->changeMode(newMode);

target->filled_rect(…)

changeMode could return this if newMode matches current setup or else do 1 of 2 things.
1.
delete this and return new replacement object
2.
Return pointer to correct static mode object.

I prefer 2 as it is less heap churn.

Good luck

GeneralRe: Analysis paralysis: Painting myself into a corner with generic programming Pin
honey the codewitch25-Jun-21 4:51
mvahoney the codewitch25-Jun-21 4:51 
GeneralCCC Pin
pkfox21-Jun-21 21:31
professionalpkfox21-Jun-21 21:31 
GeneralRe: CCC Pin
OriginalGriff21-Jun-21 22:12
mveOriginalGriff21-Jun-21 22:12 
GeneralRe: CCC Pin
pkfox21-Jun-21 22:19
professionalpkfox21-Jun-21 22:19 
GeneralRe: CCC Pin
OriginalGriff21-Jun-21 22:41
mveOriginalGriff21-Jun-21 22:41 
GeneralRe: CCC Pin
pkfox21-Jun-21 22:53
professionalpkfox21-Jun-21 22:53 
GeneralRe: CCC Pin
OriginalGriff21-Jun-21 23:34
mveOriginalGriff21-Jun-21 23:34 
GeneralRe: CCC Pin
musefan21-Jun-21 23:31
Membermusefan21-Jun-21 23:31 
GeneralRe: CCC Pin
pkfox22-Jun-21 0:40
professionalpkfox22-Jun-21 0:40 
GeneralRe: CCC Pin
Richard MacCutchan22-Jun-21 0:57
mveRichard MacCutchan22-Jun-21 0:57 
GeneralRe: CCC Pin
pkfox22-Jun-21 1:43
professionalpkfox22-Jun-21 1:43 
GeneralRe: CCC Pin
Richard MacCutchan22-Jun-21 1:48
mveRichard MacCutchan22-Jun-21 1:48 
GeneralRe: CCC Pin
pkfox22-Jun-21 2:51
professionalpkfox22-Jun-21 2:51 
GeneralRe: CCC Pin
Richard MacCutchan22-Jun-21 3:16
mveRichard MacCutchan22-Jun-21 3:16 
GeneralRe: CCC Pin
pkfox22-Jun-21 5:14
professionalpkfox22-Jun-21 5:14 
GeneralRe: CCC Pin
musefan22-Jun-21 2:20
Membermusefan22-Jun-21 2:20 
GeneralAndroid google service crash Pin
JohnWong621-Jun-21 20:13
MemberJohnWong621-Jun-21 20:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Straw Poll

Do you feel you fully understand the vision and purpose of the software project you're working on?
Sure you can be told the "what", but do you have the "why"?
  Results   27 votes