diff --git a/youtube/video_series/bit_blast/cxx_enums/bitwise_operators.png b/youtube/video_series/bit_blast/cxx_enums/bitwise_operators.png new file mode 100644 index 0000000..b6f4076 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/bitwise_operators.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/bjarne_long.jpg b/youtube/video_series/bit_blast/cxx_enums/bjarne_long.jpg new file mode 100644 index 0000000..9270ba2 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/bjarne_long.jpg differ diff --git a/youtube/video_series/bit_blast/cxx_enums/bjarne_normal.jpg b/youtube/video_series/bit_blast/cxx_enums/bjarne_normal.jpg new file mode 100644 index 0000000..6bcdc4b Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/bjarne_normal.jpg differ diff --git a/youtube/video_series/bit_blast/cxx_enums/counting_enum.png b/youtube/video_series/bit_blast/cxx_enums/counting_enum.png new file mode 100644 index 0000000..ad45c4c Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/counting_enum.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/counting_enum_arr.png b/youtube/video_series/bit_blast/cxx_enums/counting_enum_arr.png new file mode 100644 index 0000000..573d7ec Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/counting_enum_arr.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/default_case_1.png b/youtube/video_series/bit_blast/cxx_enums/default_case_1.png new file mode 100644 index 0000000..f8e042e Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/default_case_1.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/default_case_2.png b/youtube/video_series/bit_blast/cxx_enums/default_case_2.png new file mode 100644 index 0000000..d3bb162 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/default_case_2.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/default_case_3.png b/youtube/video_series/bit_blast/cxx_enums/default_case_3.png new file mode 100644 index 0000000..9bee122 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/default_case_3.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/default_case_4.png b/youtube/video_series/bit_blast/cxx_enums/default_case_4.png new file mode 100644 index 0000000..95595a0 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/default_case_4.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/explicit_vs_implicit_a.png b/youtube/video_series/bit_blast/cxx_enums/explicit_vs_implicit_a.png new file mode 100644 index 0000000..3b83c18 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/explicit_vs_implicit_a.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/explicit_vs_implicit_b.png b/youtube/video_series/bit_blast/cxx_enums/explicit_vs_implicit_b.png new file mode 100644 index 0000000..468373c Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/explicit_vs_implicit_b.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/linus_fuck.png b/youtube/video_series/bit_blast/cxx_enums/linus_fuck.png new file mode 100644 index 0000000..1c8f89d Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/linus_fuck.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/project.kdenlive b/youtube/video_series/bit_blast/cxx_enums/project.kdenlive new file mode 100644 index 0000000..8ec0653 --- /dev/null +++ b/youtube/video_series/bit_blast/cxx_enums/project.kdenlive @@ -0,0 +1,1480 @@ + + + + + 205 + pause + /home/light/.local/share/kdenlive/library/transitions/title_pop.mlt + 1 + consumer + was here + 1 + -1 + 4 + {124ec3d6-e4dd-49ba-915e-b2c2bcf87bcc} + 0 + 5945 + 6d5567398bbecf27595f85e4c7227e1b + 1 + + + 579 + pause + + 1 + 1 + 1 + kdenlivetitle + 00:00:10.000 + Utilize Zero + <kdenlivetitle LC_NUMERIC="C" duration="300" height="1440" out="299" width="2560"> + <item type="QGraphicsTextItem" z-index="0"> + <position x="504" y="635"> + <transform>1,0,0,0,1,0,0,0,1</transform> + </position> + <content alignment="4" box-height="165" box-width="1547.14" font="04b" font-color="226,26,65,255" font-italic="0" font-outline="0" font-outline-color="226,26,65,255" font-pixel-size="165" font-underline="0" font-weight="900" letter-spacing="0" line-spacing="0" shadow="1;#64000000;4;4;4" tab-width="80" typewriter="0;2;1;0;0">Utilize Zero</content> + </item> + <startviewport rect="0,0,2560,1440"/> + <endviewport rect="0,0,2560,1440"/> + <background color="246,245,244,0"/> +</kdenlivetitle> + + was here + 5 + 6 + {31518428-975e-4f7e-82be-ae95910d140e} + 2 + {a6b4cfca-045f-4de8-838e-908b58e33494} + 44607c10f6723d84407aa98828503816 + 0 + 256 + 2560 + 1440 + + + 523 + pause + /home/light/.local/share/kdenlive/library/backgrounds/gray-checkerboard.png + 25 + 1 + 1 + 1 + 2 + 5120 + 2880 + qimage + 00:00:05:00 + was here + -1 + 9 + {0fc6307f-dc1f-4133-9e1d-5843cdee54e4} + 2 + 265829 + a256afbdf5e987e75675fbdc2b937cfd + 75 + 1 + backdrop + + + 2147483647 + continue + black + 1 + color + black_track + rgba + 0 + + + 1 + + + 1 + + + 1 + 72 + 1 + 0 + + + + + + 75 + 20dB + volume + 237 + 1 + + + -1 + panner + 237 + 0.5 + 1 + + + 0 + audiolevel + 1 + 1 + + + + 1 + + + 1 + + + 1 + 72 + 1 + 0 + + + + + + 75 + 20dB + volume + 237 + 1 + + + -1 + panner + 237 + 0.5 + 1 + + + 0 + audiolevel + 1 + 1 + + + + 5514 + pause + #ff282828 + 1 + color + Color Clip + 00:00:05:00 + was here + 1 + -1 + 35 + {bbb3ce25-3b28-4057-b01c-ffda1a1d68b9} + rgb + 2 + 0 + + + + 35 + + + + + 72 + 1 + + + + + 00:00:05.000 + pause + zen_of_python.png + 25 + 1 + 1 + 1 + 2 + 1239 + 837 + qimage + 00:00:05:00 + was here + 15 + 34 + {e23a613e-f858-4a0f-8eec-7ac5fb7ae182} + 2 + 179127 + c255894954b3dc3ad0bf342320e8fcb8 + 55 + 1 + + + 249 + pause + way_traditional.png + 25 + 1 + 1 + 1 + 2 + 1255 + 710 + qimage + 00:00:05:00 + was here + 15 + 32 + {a35e2648-5aa8-43b3-8f8e-a05aa1c469ea} + 2 + 54162 + 1fe6fa01767f289a9250838588034f09 + 1 + 0 + + + 00:00:05.000 + pause + way_modern.png + 25 + 1 + 1 + 1 + 2 + 1255 + 914 + qimage + 00:00:05:00 + was here + 15 + 31 + {b5cb2830-bfcc-4b3d-a6b1-9407c3267ae3} + 2 + 84679 + 70e0ad6590811ef916388433f1e257d4 + 1 + 0 + + + 00:00:05.000 + pause + way_anon.png + 25 + 1 + 1 + 1 + 2 + 1255 + 834 + qimage + 00:00:05:00 + was here + 15 + 30 + {fe2a730d-1ae6-4f22-9bd3-c9edc0a4bd89} + 2 + 64068 + 428ea3054e6de67cc056ff24b5de271a + 1 + 25 + + + 00:00:05.000 + pause + explicit_vs_implicit_a.png + 25 + 1 + 1 + 1 + 2 + 760 + 571 + qimage + 00:00:05:00 + was here + 15 + 23 + {583ad5d7-364f-4fad-ac92-e284f6ad1c42} + 2 + 38513 + c63244ce987a3cb7c4037a9912218a0c + 1 + 0 + + + 00:00:05.000 + pause + explicit_vs_implicit_b.png + 25 + 1 + 1 + 1 + 2 + 2463 + 571 + qimage + 00:00:05:00 + was here + 15 + 24 + {979f2e02-df0b-468b-8deb-b71742ebb712} + 2 + 58970 + 2edc93fae75f50153c9fb2a88f75710c + 1 + 128 + + + 00:00:05.000 + pause + long_bjarne.jpg + 25 + 1 + 1 + 1 + 1 + 1060 + 481 + qimage + 00:00:05:00 + was here + 36 + 37 + {bdc1bc76-7b8f-49b8-9363-aac0162fe180} + 2 + 77597 + 1b6a1d10de46f4ce0b63d01e652aae7f + 0 + 1 + + + + 34 + -1 + + 1 + 1 + brightness + fade_from_black + 00:00:00.000=0;00:00:00.333=1 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:01.000=0 + 0 + + + + 9 + + 1 + qtblend + qtblend + 0 + 0 + 00:00:00.000=0 0 5120 2880 1.000000;00:00:13.067=-332 -332 5120 2880 1.000000 + 00:00:00.000=0;00:00:13.067=15 + 0 + + + avfilter.gblur + avfilter.gblur + 1 + 7 + 00:00:00.000=15 + 00:00:00.000=15 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:00.367=0 + 0 + + + 1 + 1 + brightness + fade_from_black + 00:00:00.000=0;00:00:00.467=1 + + + + + 32 + + 1 + 1 + brightness + fade_from_black + 00:00:00.000=0;00:00:00.333=1 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:01.033=0 + 0 + + + + + 31 + + 1 + 1 + brightness + fade_from_fast_fade_in + 0=0;-1=1 + 0 + + + + 30 + + 1 + 1 + brightness + fade_from_fast_fade_in + 0=0;-1=1 + + + + + 23 + + 1 + 1 + brightness + fade_from_black + 00:00:00.000=0;00:00:00.133=1 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:01.000=0 + 0 + + + + 24 + + 1 + 1 + brightness + fade_from_black + 00:00:00.000=0;00:00:00.333=1 + 0 + + + + + 37 + + 1 + 1 + brightness + fade_from_black + 00:00:00.000=0;00:00:00.333=1 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:01.000=0 + 0 + + + + + + 72 + 1 + 0 + + + + + + + 396 + pause + bjarne_normal.jpg + 25 + 1 + 1 + 1 + 1 + 900 + 413 + qimage + 00:00:05:00 + was here + 36 + 38 + {3e406fe2-ad8d-48da-a4d5-e1f64327bed0} + 2 + 71300 + a88bc891491760858b03c8eeec715cf0 + 1 + + + + + 38 + 3 + + avfilter.gblur + avfilter.gblur + 1 + 7 + 00:00:00.000=15;00:00:01.000=5 + 00:00:00.000=15;00:00:01.000=5 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:01.000=0 + 1 + + + 1 + 1 + brightness + fade_from_black + 00:00:00.000=0;00:00:00.767=1 + 0 + + + 1 + qtblend + qtblend + 0 + 0 + 00:00:00.000=-61 -169 3134 1762 1.000000 + 00:00:00.000=0 + 0 + + + + + 9 + + 1 + qtblend + qtblend + 0 + 0 + 00:00:00.000=0 0 5120 2880 1.000000;00:00:04.967=-332 -332 5120 2880 1.000000 + 00:00:00.000=0;00:00:04.967=15 + 0 + + + avfilter.gblur + avfilter.gblur + 1 + 7 + 00:00:00.000=15 + 00:00:00.000=15 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:00.367=0 + 0 + + + + + 9 + + 1 + qtblend + qtblend + 0 + 0 + 00:00:00.000=0 0 5120 2880 1.000000;00:00:04.967=-332 -332 5120 2880 1.000000 + 00:00:00.000=0;00:00:04.967=15 + 0 + + + avfilter.gblur + avfilter.gblur + 1 + 7 + 00:00:00.000=15 + 00:00:00.000=15 + 0 + + + + + 9 + + 1 + qtblend + qtblend + 0 + 0 + 00:00:00.000=0 0 5120 2880 1.000000;00:00:04.967=-332 -332 5120 2880 1.000000 + 00:00:00.000=0;00:00:04.967=15 + 0 + + + avfilter.gblur + avfilter.gblur + 1 + 7 + 00:00:00.000=15 + 00:00:00.000=15 + 0 + + + + + 9 + + 1 + qtblend + qtblend + 0 + 0 + 00:00:00.000=0 0 5120 2880 1.000000;00:00:04.967=-332 -332 5120 2880 1.000000 + 00:00:00.000=0;00:00:04.967=15 + 0 + + + avfilter.gblur + avfilter.gblur + 1 + 7 + 00:00:00.000=15 + 00:00:00.000=15 + 0 + + + + + 9 + + 1 + qtblend + qtblend + 0 + 0 + 00:00:00.000=0 0 5120 2880 1.000000;00:00:05.033=-332 -332 5120 2880 1.000000 + 00:00:00.000=0;00:00:05.033=15 + 0 + + + avfilter.gblur + avfilter.gblur + 1 + 7 + 00:00:00.000=15 + 00:00:00.000=15 + 0 + + + + + + 72 + 1 + 0 + + + + + + + 579 + pause + + 1 + 1 + 1 + kdenlivetitle + 00:00:10.000 + Prefer Scope... + <kdenlivetitle LC_NUMERIC="C" duration="300" height="1440" out="299" width="2560"> + <item type="QGraphicsTextItem" z-index="0"> + <position x="262.578" y="655"> + <transform>1,0,0,0,1,0,0,0,1</transform> + </position> + <content alignment="4" box-height="126" box-width="2027.16" font="04b" font-color="226,26,65,255" font-italic="0" font-pixel-size="126" font-underline="0" font-weight="900" letter-spacing="0" line-spacing="0" shadow="1;#64000000;4;4;4" tab-width="80" typewriter="0;2;1;0;0">Prefer Scoped Enums</content> + </item> + <startviewport rect="0,0,2560,1440"/> + <endviewport rect="0,0,2560,1440"/> + <background color="246,245,244,0"/> +</kdenlivetitle> + + was here + 5 + 10 + 2 + d90a77c4289fcff607248099a4c44bba + 0 + 256 + [ + { + "in": 0, + "name": "Zone 1", + "out": 204 + } +] + + {ed8dd686-e201-422e-a8b2-23aba3acb5a1} + {08569a2b-3cbf-4c7f-a048-c971b1981091} + 2560 + 1440 + + + 579 + pause + + 1 + 1 + 1 + kdenlivetitle + 00:00:10.000 + Specify the ... + <kdenlivetitle LC_NUMERIC="C" duration="300" height="1440" out="299" width="2560"> + <item type="QGraphicsTextItem" z-index="0"> + <position x="238" y="662"> + <transform>1,0,0,0,1,0,0,0,1</transform> + </position> + <content alignment="4" box-height="112" box-width="2079.25" font="04b" font-color="226,26,65,255" font-italic="0" font-outline="0" font-outline-color="226,26,65,255" font-pixel-size="112" font-underline="0" font-weight="900" letter-spacing="0" line-spacing="0" shadow="1;#64000000;4;4;4" tab-width="80" typewriter="0;2;1;0;0">Specify Underlying Type</content> + </item> + <startviewport rect="0,0,2560,1440"/> + <endviewport rect="0,0,2560,1440"/> + <background color="246,245,244,0"/> +</kdenlivetitle> + + was here + 5 + 11 + 2 + 968f6e6d79a2136cf5951d58537d837c + 0 + 256 + {7dd8e342-adf6-46fb-8f78-617cc4f26990} + {fde6d0b4-602c-4e9b-9b88-178e234ac60a} + 2560 + 1440 + + + 579 + pause + + 1 + 1 + 1 + kdenlivetitle + 00:00:10.000 + Avoid the De... + <kdenlivetitle LC_NUMERIC="C" duration="300" height="1440" out="299" width="2560"> + <item type="QGraphicsTextItem" z-index="0"> + <position x="235" y="647"> + <transform>1,0,0,0,1,0,0,0,1</transform> + </position> + <content alignment="4" box-height="141" box-width="2085.69" font="04b" font-color="226,26,65,255" font-italic="0" font-outline="0" font-outline-color="226,26,65,255" font-pixel-size="141" font-underline="0" font-weight="900" letter-spacing="0" line-spacing="0" shadow="1;#64000000;4;4;4" tab-width="80" typewriter="0;2;1;0;0">Avoid Default Case</content> + </item> + <startviewport rect="0,0,2560,1440"/> + <endviewport rect="0,0,2560,1440"/> + <background color="246,245,244,0"/> +</kdenlivetitle> + + was here + 5 + 12 + 2 + c49c69dfa277a7b35ee6d4717e6a2276 + 0 + 256 + {4cab6d9b-3a41-4e56-8658-45dbb0a1a26b} + {d479436b-68a3-4d80-8c38-874ddb45af0a} + 2560 + 1440 + + + 579 + pause + + 1 + 1 + 1 + kdenlivetitle + 00:00:10.000 + Utilize Coun... + <kdenlivetitle LC_NUMERIC="C" duration="300" height="1440" out="299" width="2560"> + <item type="QGraphicsTextItem" z-index="0"> + <position x="262" y="635"> + <transform>1,0,0,0,1,0,0,0,1</transform> + </position> + <content alignment="4" box-height="165" box-width="2032.41" font="04b" font-color="226,26,65,255" font-italic="0" font-outline="0" font-outline-color="226,26,65,255" font-pixel-size="165" font-underline="0" font-weight="900" letter-spacing="0" line-spacing="0" shadow="1;#64000000;4;4;4" tab-width="80" typewriter="0;2;1;0;0">Utilize Counting</content> + </item> + <startviewport rect="0,0,2560,1440"/> + <endviewport rect="0,0,2560,1440"/> + <background color="246,245,244,0"/> +</kdenlivetitle> + + was here + 5 + 13 + 2 + 42ba4b3c6c8f8d35a587d57e1fd4d6b5 + 0 + 256 + {a9b82118-c87f-4b1b-95b8-a1d7a763da96} + {f9597a47-13c5-478b-b997-6d8a7eedb907} + 2560 + 1440 + + + + + 10 + + 1 + qtblend + POP IN! + 0 + 0 + 00:00:00.000$=1280 720 1 1 1.000000;00:00:00.167$=-320 -180 3200 1800 1.000000;00:00:00.233$=0 0 2560 1440 1.000000 + 00:00:00.000$=0;00:00:00.167$=0;00:00:00.233$=0 + 0 + + + 1 + 1 + brightness + fade_to_black + 00:00:00.000=1;00:00:00.400=0 + 0 + + + + + 11 + + 1 + qtblend + POP IN! + 0 + 0 + 00:00:00.000$=1280 720 1 1 1.000000;00:00:00.167$=-320 -180 3200 1800 1.000000;00:00:00.233$=0 0 2560 1440 1.000000 + 00:00:00.000$=0;00:00:00.167$=0;00:00:00.233$=0 + 0 + + + + + 12 + + + + 6 + + 1 + qtblend + POP IN! + 0 + 0 + 00:00:00.000$=1280 720 1 1 1.000000;00:00:00.167$=-320 -180 3200 1800 1.000000;00:00:00.233$=0 0 2560 1440 1.000000 + 00:00:00.000$=0;00:00:00.167$=0;00:00:00.233$=0 + 0 + + + + + 13 + + + + + 72 + 1 + 0 + + + + + + + 00:03:03.800 + 5514 + Sequence 1 + + {448b7f7c-b202-4bc6-82f7-a54eb1ca5186} + 17 + {448b7f7c-b202-4bc6-82f7-a54eb1ca5186} + 3 + 0 + db528c9543f9999ecf97037798108b14 + 2 + 4 + 1 + 0 + {448b7f7c-b202-4bc6-82f7-a54eb1ca5186} + 1 + 1 + 293 + 0 + 4 + 6 + 1 + 2 + 0 + 977 + 8 + [ +] + + [ +] + + 0 + 1070 + 0 + + + + + + + + + 0 + 1 + mix + mix + 237 + 1 + 1 + 1 + + + 0 + 2 + mix + mix + 237 + 1 + 1 + 1 + + + 0 + 3 + 0 + 0 + 0 + qtblend + qtblend + 237 + 1 + + + 0 + 4 + 0 + 0 + 0 + qtblend + qtblend + 237 + 1 + + + 0 + 5 + 0 + 0 + 0 + qtblend + qtblend + 237 + 1 + + + 0 + 6 + 0 + 0 + 0 + qtblend + qtblend + 237 + 1 + + + 75 + 20dB + volume + 237 + 1 + + + -1 + panner + 237 + 0.5 + 1 + + + + 579 + pause + + 1 + 1 + 1 + kdenlivetitle + 00:00:10.000 + Bitfield? Ov... + <kdenlivetitle LC_NUMERIC="C" duration="300" height="1440" out="299" width="2560"> + <item type="QGraphicsTextItem" z-index="0"> + <position x="223" y="674"> + <transform>1,0,0,0,1,0,0,0,1</transform> + </position> + <content alignment="4" box-height="88" box-width="2110.67" font="04b" font-color="226,26,65,255" font-italic="0" font-outline="0" font-outline-color="226,26,65,255" font-pixel-size="88" font-underline="0" font-weight="900" letter-spacing="0" line-spacing="0" shadow="1;#64000000;4;4;4" tab-width="80" typewriter="0;2;1;0;0">Bitfield? Overload Bitwise OPs</content> + </item> + <startviewport rect="0,0,2560,1440"/> + <endviewport rect="0,0,2560,1440"/> + <background color="246,245,244,0"/> +</kdenlivetitle> + + was here + 5 + 14 + 2 + 0a683ffba883e9458659db06774a04a8 + 0 + 256 + {35eb8e38-40d0-4d0d-8d6c-ae8361231426} + {6b173af3-2df0-45da-bb39-d10ce5225a54} + 2560 + 1440 + + + 00:00:05.000 + pause + counting_enum.png + 25 + 1 + 1 + 1 + 2 + 691 + 500 + qimage + 00:00:05:00 + was here + 15 + 17 + {9b1aeab7-a8fa-44fd-80f4-5bd530a261cc} + 2 + 22157 + f6cdd3fc8d858fb1d0352766e089ef4e + + + 00:00:05.000 + pause + bitwise_operators.png + 25 + 1 + 1 + 1 + 2 + 1177 + 1164 + qimage + 00:00:05:00 + was here + 15 + 16 + {0b4e9362-0c55-47a2-aa57-a6b34feab803} + 2 + 115299 + 77f15eca6ff6facfa9b325426f99200f + 0 + 1 + + + 00:00:05.000 + pause + counting_enum_arr.png + 25 + 1 + 1 + 1 + 2 + 992 + 537 + qimage + 00:00:05:00 + was here + 15 + 18 + {a24f831c-cf30-4353-98fa-84fa7d11b3ad} + 2 + 32575 + 4dd1fd72d818f71541138c48c3c940b9 + + + 00:00:05.000 + pause + default_case_1.png + 25 + 1 + 1 + 1 + 2 + 676 + 945 + qimage + 00:00:05:00 + was here + 15 + 19 + {16838c6c-df33-42ff-b0e5-2f6a7688d43d} + 2 + 53052 + b176927e191de664403c6215420942b0 + + + 00:00:05.000 + pause + default_case_2.png + 25 + 1 + 1 + 1 + 2 + 1301 + 965 + qimage + 00:00:05:00 + was here + 15 + 20 + {2df08370-b35c-40df-a671-f947a75f8c6f} + 2 + 79844 + 793ad0db107d946095f6e87a4952ca45 + + + 00:00:05.000 + pause + default_case_3.png + 25 + 1 + 1 + 1 + 2 + 1796 + 834 + qimage + 00:00:05:00 + was here + 15 + 21 + {e72d59f2-fe25-406f-b8c0-abe8a242532e} + 2 + 74076 + 123ce3acdee0a8c11acf681a21b2bee4 + + + 00:00:05.000 + pause + default_case_4.png + 25 + 1 + 1 + 1 + 2 + 1611 + 893 + qimage + 00:00:05:00 + was here + 15 + 22 + {d07e0c8c-7161-4c11-b63b-638c0429c399} + 2 + 80439 + b79e8aa0291bc7797965a76294874521 + + + 00:00:05.000 + pause + scoped_enum_since_cpp11.png + 25 + 1 + 1 + 1 + 2 + 1472 + 708 + qimage + 00:00:05:00 + was here + 15 + 25 + {fb0178ed-4ff1-4100-acf4-f097689bc078} + 2 + 174503 + 57dfe77a2f90264bb4cd39ecf61aa02e + + + 00:00:05.000 + pause + specify_underlying_type.png + 25 + 1 + 1 + 1 + 2 + 2526 + 347 + qimage + 00:00:05:00 + was here + 15 + 26 + {31703df8-e68f-442b-9e21-792c2f44975f} + 2 + 29523 + 5243f0e5df4f3cf84d52d7e89f2cfb5c + + + 00:00:05.000 + pause + std_utils.png + 25 + 1 + 1 + 1 + 2 + 1319 + 963 + qimage + 00:00:05:00 + was here + 15 + 27 + {eacb50d8-8c67-47e1-b304-52ce9ac82811} + 2 + 127712 + e1d698e7f8293b68932a9a67c9d47b14 + + + 00:00:05.000 + pause + the_zen_of_python.png + 25 + 1 + 1 + 1 + 2 + 1228 + 839 + qimage + 00:00:05:00 + was here + 15 + 28 + {bb46c5e4-dd21-4ab4-a3ac-29121822385f} + 2 + 173841 + fe953158a00f69c6f231dcfd03e62d1d + 1 + 0 + + + 00:00:05.000 + pause + vk_result.png + 25 + 1 + 1 + 1 + 2 + 804 + 1039 + qimage + 00:00:05:00 + was here + 15 + 29 + {ebf58c6f-3559-457d-a3e3-05f5d4713947} + 2 + 143255 + 47f9e893c1526e650d4ffea30897be25 + + + 00:00:05.000 + pause + zero.png + 25 + 1 + 1 + 1 + 2 + 486 + 738 + qimage + 00:00:05:00 + was here + 15 + 33 + {21641cec-2b76-4eca-b00b-5c6253f72258} + 2 + 36130 + 02f278e5b040326fd2052cdf7d17d27a + 1 + 0 + + + Sequences + Transitions + 2 + {448b7f7c-b202-4bc6-82f7-a54eb1ca5186} + 2 + 100 + /home/light/kdenlive/ + 1756201619925 + 0 + 0 + 0 + + 0 + 0 + [ + { + "color": "#9b59b6", + "comment": "Category 1", + "index": 0 + }, + { + "color": "#3daee9", + "comment": "Category 2", + "index": 1 + }, + { + "color": "#1abc9c", + "comment": "Category 3", + "index": 2 + }, + { + "color": "#1cdc9a", + "comment": "Category 4", + "index": 3 + }, + { + "color": "#c9ce3b", + "comment": "Category 5", + "index": 4 + }, + { + "color": "#fdbc4b", + "comment": "Category 6", + "index": 5 + }, + { + "color": "#f39c1f", + "comment": "Category 7", + "index": 6 + }, + { + "color": "#f47750", + "comment": "Category 8", + "index": 7 + }, + { + "color": "#da4453", + "comment": "Category 9", + "index": 8 + } +] + + 25.08.0 + {448b7f7c-b202-4bc6-82f7-a54eb1ca5186} + + + qhd_1440p_30 + + 2000 + 800 + 1000 + + 640 + 9000 + {dd0d00b2-e4d7-4440-a847-030fb205c38c} + {448b7f7c-b202-4bc6-82f7-a54eb1ca5186} + 1.1 + 36 + 0 + project_bin:-1:0 + + 2 + Code Snippets + Images + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 + + + diff --git a/youtube/video_series/bit_blast/cxx_enums/scoped_enum_since_cpp11.png b/youtube/video_series/bit_blast/cxx_enums/scoped_enum_since_cpp11.png new file mode 100644 index 0000000..efa86bb Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/scoped_enum_since_cpp11.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/script b/youtube/video_series/bit_blast/cxx_enums/script new file mode 100644 index 0000000..de4a501 --- /dev/null +++ b/youtube/video_series/bit_blast/cxx_enums/script @@ -0,0 +1,62 @@ +# Hook +"There should be one, and preferably only one, obvious way to do it." --- The Zen of Python +A principle which C++ defies in many fronts, enums being one of them, +assuming you know the basics, let's learn more about enums! + +# Ways to declare enums +There are mainly 3 ways we could declare one. + +1: The classic -- unscoped enum +-> Which allows implicit conversion to integer types +-> And pollutes the enclosing namespace +-> Pretty dangerous + +2: The modern -- scoped enum, using the `class` (or `struct`) keywrod +-> Which prohibits implicit conversions (even to the direct underlying type) +-> And requires proper qualification when accessing its elements + +3: The anonymous enum +-> Much like the classic enum, but without a qualifier +-> It was used as a way of storing constants before constexprs were a thing +-> There's a neat trick you coud do with anonymous or unscoped enums, and that is to put it inside a namespace and have the middle-ground of scoped and unscoped enums + -> It allows implicit conversion to integer types. + -> But, it still requires proper qualification when accessing its elements. And won't pollute the enclosing namespace. + +# Which is the way? +But what's the right way? +That depends on how you wanna shoot yourself in the foot. + +1- Use the classic one when writing C or your C++ is too old. +2- Use the namespace trick when you can't be arsed to explicitly convert. +3- And prefer the scoped enum in literary all the other cases. + +Now, let's get to some tips and tricks... +# Tips & Tricks +1: Prefer Scoped Enums. +Explicit is safer than implicit + +2: Specify the Underlying Type +Like this! always do this, even if the type is int--- It serves as documentation and explicitly states your intent. + +3: Avoid the "default" Case +This may be too much in certain cases, but try to develop a preference for explicitly handling all enums values. +Even if multiple values execute the same code, you could fall-through them if you don't put breaks in-between. +You could enable warnings as errors for catching incomplete switch statements. +So when you inevitably add new values to your enums, the compiler will have your back. + +4: Utilize [Dio: ZERO] +Since zero evaluates to false, and other values to true, you could treat it as a special value for making a binary decision. +For example, in Vulkan API, the VkResult has 0 for success, and errors are set to non-zero values. +This makes the decision to handle-error or move-on a binary decision like this. + +5: Utilize Its Counting Nature +The values are implicitly incremented, this means you could have a "count" element at the end like so. + +6: (Are you using it as a) Bitfield? (Then consider) Overload(ing) the Bitwise Operators. + + + +# Zoom out to outro... +Anyways! Here are some enum utilities from the standard library... +If you want more of these kind of videos, consider subscribing. +chao ^~^! diff --git a/youtube/video_series/bit_blast/cxx_enums/specify_underlying_type.png b/youtube/video_series/bit_blast/cxx_enums/specify_underlying_type.png new file mode 100644 index 0000000..097b64f Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/specify_underlying_type.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/std_utils.png b/youtube/video_series/bit_blast/cxx_enums/std_utils.png new file mode 100644 index 0000000..6dd1837 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/std_utils.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/the_zen_of_python.png b/youtube/video_series/bit_blast/cxx_enums/the_zen_of_python.png new file mode 100644 index 0000000..486ab16 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/the_zen_of_python.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/vk_result.png b/youtube/video_series/bit_blast/cxx_enums/vk_result.png new file mode 100644 index 0000000..186cdeb Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/vk_result.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/way_anon.png b/youtube/video_series/bit_blast/cxx_enums/way_anon.png new file mode 100644 index 0000000..98ab4b7 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/way_anon.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/way_modern.png b/youtube/video_series/bit_blast/cxx_enums/way_modern.png new file mode 100644 index 0000000..ed0248f Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/way_modern.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/way_traditional.png b/youtube/video_series/bit_blast/cxx_enums/way_traditional.png new file mode 100644 index 0000000..0104457 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/way_traditional.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/zen_of_python.png b/youtube/video_series/bit_blast/cxx_enums/zen_of_python.png new file mode 100644 index 0000000..181fe65 Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/zen_of_python.png differ diff --git a/youtube/video_series/bit_blast/cxx_enums/zero.png b/youtube/video_series/bit_blast/cxx_enums/zero.png new file mode 100644 index 0000000..65ab09f Binary files /dev/null and b/youtube/video_series/bit_blast/cxx_enums/zero.png differ