Added reasons to assertions
This commit is contained in:
		@@ -12,7 +12,7 @@ enum TicTacToeTileState Dawn::ticTacToeDetermineWinner(
 | 
			
		||||
  std::vector<uint8_t> *winningCombo
 | 
			
		||||
) {
 | 
			
		||||
  uint8_t i;
 | 
			
		||||
  assertNotNull(winningCombo);
 | 
			
		||||
  assertNotNull(winningCombo, "ticTacToeDetermineWinner: winningCombo cannot be null");
 | 
			
		||||
 | 
			
		||||
  // Check rows
 | 
			
		||||
  for(i = 0; i < 9; i += 3) {
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ VNTextboxScroller::VNTextboxScroller(SceneItem *item) :
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VNTextboxScroller::onStart() {
 | 
			
		||||
  assertNotNull(label);
 | 
			
		||||
  assertNotNull(label, "VNTextboxScroller::onStart: Label cannot be null");
 | 
			
		||||
 | 
			
		||||
  std::function<void()> x = [&]{
 | 
			
		||||
    this->lineCurrent = 0;
 | 
			
		||||
@@ -101,5 +101,4 @@ bool_t VNTextboxScroller::hasRevealedAllCharacters() {
 | 
			
		||||
    this->lineCurrent + this->visibleLines >=
 | 
			
		||||
    this->label->lines.size()
 | 
			
		||||
  );
 | 
			
		||||
  assertUnreachable();
 | 
			
		||||
}
 | 
			
		||||
@@ -29,8 +29,8 @@ VNEvent * VNEvent::getNextEvent() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void VNEvent::next() {
 | 
			
		||||
  assertNotNull(this->manager);
 | 
			
		||||
  assertNotNull(this->parent);
 | 
			
		||||
  assertNotNull(this->manager, "VNEvent::next: Manager cannot be null");
 | 
			
		||||
  assertNotNull(this->parent, "VNEvent::next: Parent cannot be null");
 | 
			
		||||
 | 
			
		||||
  this->end();
 | 
			
		||||
  auto next = this->getNextEvent();
 | 
			
		||||
 
 | 
			
		||||
@@ -19,8 +19,8 @@ namespace Dawn {
 | 
			
		||||
 | 
			
		||||
    protected:
 | 
			
		||||
      void onStart() override {
 | 
			
		||||
        assertNotNull(ifTrue);
 | 
			
		||||
        assertNotNull(ifEnd);
 | 
			
		||||
        assertNotNull(ifTrue, "VNIfEvent::onStart: ifTrue cannot be null");
 | 
			
		||||
        assertNotNull(ifEnd, "VNIfEvent::onStart: ifEnd cannot be null");
 | 
			
		||||
 | 
			
		||||
        if(this->manager->getFlag(key) == value) {
 | 
			
		||||
          useEvent([&]{
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,7 @@ namespace Dawn {
 | 
			
		||||
 | 
			
		||||
      void onStart() override {
 | 
			
		||||
        scroller = this->getScene()->findComponent<VNTextboxScroller>();
 | 
			
		||||
        assertNotNull(scroller);
 | 
			
		||||
        assertNotNull(scroller, "VNTextEvent::onStart: VNTextboxScroller cannot be null");
 | 
			
		||||
 | 
			
		||||
        auto richText = stringReplaceAll(this->manager->defaultFont, "{{ text }}", this->text);
 | 
			
		||||
        scroller->label->richText = richText;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user