~ppsspp/ppsspp/ppsspp_1.3.0

« back to all changes in this revision

Viewing changes to ext/armips/Commands/CDirectiveMessage.cpp

  • Committer: Sérgio Benjamim
  • Date: 2017-01-02 00:12:05 UTC
  • Revision ID: sergio_br2@yahoo.com.br-20170102001205-cxbta9za203nmjwm
1.3.0 source (from ppsspp_1.3.0-r160.p5.l1762.a165.t83~56~ubuntu16.04.1.tar.xz).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "stdafx.h"
 
2
#include "Commands/CDirectiveMessage.h"
 
3
#include "Core/Common.h"
 
4
 
 
5
CDirectiveMessage::CDirectiveMessage(Type type, Expression exp)
 
6
{
 
7
        errorType = type;
 
8
        this->exp = exp;
 
9
}
 
10
 
 
11
bool CDirectiveMessage::Validate()
 
12
{
 
13
        std::wstring text;
 
14
        if (exp.evaluateString(text,true) == false)
 
15
        {
 
16
                Logger::queueError(Logger::Error,L"Invalid expression");
 
17
                return false;
 
18
        }
 
19
 
 
20
        switch (errorType)
 
21
        {
 
22
        case Type::Warning:
 
23
                Logger::queueError(Logger::Warning,text);
 
24
                break;
 
25
        case Type::Error:
 
26
                Logger::queueError(Logger::Error,text);
 
27
                break;
 
28
        case Type::Notice:
 
29
                Logger::queueError(Logger::Notice,text);
 
30
                break;
 
31
        }
 
32
        return false;
 
33
}
 
 
b'\\ No newline at end of file'