Anonymous | Login | Signup for a new account | 2021-01-27 04:43 EET |
Main | My View | View Issues | Change Log | Roadmap | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0000325 | [Yate - Yet Another Telephony Engine] documentation | minor | always | 2012-12-09 05:11 | 2013-02-21 13:23 | |||||||
Reporter | FishB8 | View Status | public | |||||||||
Assigned To | ||||||||||||
Priority | normal | Resolution | open | |||||||||
Status | new | Product Version | 4.x | |||||||||
Summary | 0000325: Inconsistent bool values used in config files | |||||||||||
Description |
In the default config files, there is quite a variety of values used for bool settings. on/off, enable/disable, 0/1, true/false, and even default. (??) Needs to be consistent. Pick one and stick with it. |
|||||||||||
Additional Information | ||||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | ||||||||||||
|
![]() |
|
(0000513) asymetrixs (reporter) 2013-02-21 13:23 |
See http://yate.null.ro/websvn/filedetails.php?repname=yate&path=%2Ftrunk%2Fengine%2FString.cpp [^] This seems to be just a documentation issue (and the usage in config files) but you can use what you want: static const char* str_false[] = { "false", "no", "off", "disable", "f", 0 }; static const char* str_true[] = { "true", "yes", "on", "enable", "t", 0 }; bool String::toBoolean(bool defvalue) const { if (!m_string) return defvalue; const char **test; for (test=str_false; *test; test++) if (!::strcmp(m_string,*test)) return false; for (test=str_true; *test; test++) if (!::strcmp(m_string,*test)) return true; return defvalue; } bool String::isBoolean() const { if (!m_string) return false; const char **test; for (test=str_false; *test; test++) if (!::strcmp(m_string,*test)) return true; for (test=str_true; *test; test++) if (!::strcmp(m_string,*test)) return true; return false; } |
![]() |
|||
Date Modified | Username | Field | Change |
2012-12-09 05:11 | FishB8 | New Issue | |
2013-02-21 13:23 | asymetrixs | Note Added: 0000513 |
Copyright © 2000 - 2008 Mantis Group |