{"id":25,"date":"2011-07-10T23:29:40","date_gmt":"2011-07-10T21:29:40","guid":{"rendered":"https:\/\/blogs.scummvm.org\/enginmanap\/?p=25"},"modified":"2022-04-15T20:50:22","modified_gmt":"2022-04-15T18:50:22","slug":"using-common","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/enginmanap\/2011\/07\/10\/using-common\/","title":{"rendered":"Using Common::"},"content":{"rendered":"<p>This was a smooth week for me. I had no big glitches, no unpretictable segmantation faults etc. I worked on different parts, but the most important class I created is the Stack class.<\/p>\n<p>There was a implementation of stack in stack.h\/cpp, but fingolfin leave a TODO comment that suggest replacing with Common::Stack, so I did that. I had seen code parts using Common but this was the first time I did. The stack was used for both int16 and void*. There is a union of those two, and a enum for type, capsulated as stackElementStruck, so it uses spesific pop and push functions. first I made it a class, and added constructors for both possible data type, then created a new Stack class, inherited Common:Stack, and added pop &amp; push methods to it. It is pretty straight forward, but it feels better integrated.<\/p>\n<p>I am thinking about using Common::List for some of the parts I already worked on, but it has to wait after midterms, which is this week.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This was a smooth week for me. I had no big glitches, no unpretictable segmantation faults etc. I worked on different parts, but the most important class I created is the Stack class. There was a implementation of stack in stack.h\/cpp, but fingolfin leave a TODO comment that suggest replacing with Common::Stack, so I did [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-25","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/posts\/25","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/comments?post=25"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/posts\/25\/revisions"}],"predecessor-version":[{"id":26,"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/posts\/25\/revisions\/26"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/media?parent=25"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/categories?post=25"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/enginmanap\/wp-json\/wp\/v2\/tags?post=25"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}