MCPcopy Create free account
hub / github.com/AutoHotkey/AutoHotkey / ConvertDirectiveBool

Method ConvertDirectiveBool

source/script.cpp:4004–4015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4002
4003
4004ResultType Script::ConvertDirectiveBool(LPTSTR aBuf, bool &aResult, bool aDefault)
4005{
4006 if (!aBuf || !*aBuf)
4007 aResult = aDefault;
4008 else if (!_tcsicmp(aBuf, _T("true")) || *aBuf == '1' && !aBuf[1])
4009 aResult = true;
4010 else if (!_tcsicmp(aBuf, _T("false")) || *aBuf == '0' && !aBuf[1])
4011 aResult = false;
4012 else
4013 return FAIL;
4014 return OK;
4015}
4016
4017
4018

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected