Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename DEBUG enum as Debug. #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions drw_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ BAD_READ_ENTITIES, /*!< error in entities read process. */
BAD_READ_OBJECTS /*!< error in objects read process. */
};

enum DBG_LEVEL {
NONE,
DEBUG
enum DebugLevel {
None,
Debug
};

//! Special codes for colors
Expand Down
4 changes: 2 additions & 2 deletions drw_entities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ bool DRW_LWPolyline::parseDwg(DRW::Version version, dwgBuffer *buf, duint32 bs){
}
}
}
if (DRW_DBGGL == DRW_dbg::DEBUG){
if (DRW_DBGGL == DRW_dbg::Debug){
DRW_DBG("\nVertex list: ");
for (std::vector<DRW_Vertex2D *>::iterator it = vertlist.begin() ; it != vertlist.end(); ++it){
DRW_Vertex2D* pv = *it;
Expand Down Expand Up @@ -2210,7 +2210,7 @@ bool DRW_Spline::parseDwg(DRW::Version version, dwgBuffer *buf, duint32 bs){
DRW_Coord* crd = new DRW_Coord(buf->get3BitDouble());
fitlist.push_back (crd);
}
if (DRW_DBGGL == DRW_dbg::DEBUG){
if (DRW_DBGGL == DRW_dbg::Debug){
DRW_DBG("\nknots list: ");
for (std::vector<double>::iterator it = knotslist.begin() ; it != knotslist.end(); ++it){
DRW_DBG("\n"); DRW_DBG(*it);
Expand Down
2 changes: 1 addition & 1 deletion drw_header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2392,7 +2392,7 @@ bool DRW_Header::parseDwg(DRW::Version version, dwgBuffer *buf, dwgBuffer *hBbuf
DRW_DBG("\nstring buf position: "); DRW_DBG(buf->getPosition());
DRW_DBG(" string buf bit position: "); DRW_DBG(buf->getBitPos());

if (DRW_DBGGL == DRW_dbg::DEBUG){
if (DRW_DBGGL == DRW_dbg::Debug){
for (std::map<std::string,DRW_Variant*>::iterator it=vars.begin(); it!=vars.end(); ++it){
DRW_DBG("\n"); DRW_DBG(it->first); DRW_DBG(": ");
switch (it->second->type){
Expand Down
4 changes: 2 additions & 2 deletions intern/drw_dbg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DRW_dbg *DRW_dbg::getInstance(){
}

DRW_dbg::DRW_dbg(){
level = NONE;
level = None;
prClass = new print_none;
flags = std::cerr.flags();
}
Expand All @@ -65,7 +65,7 @@ void DRW_dbg::setLevel(LEVEL lvl){
level = lvl;
delete prClass;
switch (level){
case DEBUG:
case Debug:
prClass = new print_debug;
break;
default:
Expand Down
4 changes: 2 additions & 2 deletions intern/drw_dbg.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class print_none;
class DRW_dbg {
public:
enum LEVEL {
NONE,
DEBUG
None,
Debug
};
void setLevel(LEVEL lvl);
LEVEL getLevel();
Expand Down
4 changes: 2 additions & 2 deletions intern/dwgreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ bool dwgReader::readDwgTables(DRW_Header& hdr, dwgBuffer *dbuf) {
}

//RLZ: parse remaining object controls, TODO: implement all
if (DRW_DBGGL == DRW_dbg::DEBUG){
if (DRW_DBGGL == DRW_dbg::Debug){
mit = ObjectMap.find(hdr.viewCtrl);
if (mit==ObjectMap.end()) {
DRW_DBG("\nWARNING: View control not found\n");
Expand Down Expand Up @@ -1184,7 +1184,7 @@ bool dwgReader::readDwgObjects(DRW_Interface& intfa, dwgBuffer *dbuf){
if (ret)
ret = ret2;
}
if (DRW_DBGGL == DRW_dbg::DEBUG) {
if (DRW_DBGGL == DRW_dbg::Debug) {
for (std::map<duint32, objHandle>::iterator it=remainingMap.begin(); it != remainingMap.end(); ++it){
DRW_DBG("\nnum.# "); DRW_DBG(i++); DRW_DBG(" Remaining object Handle, loc, type= "); DRW_DBG(it->first);
DRW_DBG(" "); DRW_DBG(it->second.loc); DRW_DBG(" "); DRW_DBG(it->second.type);
Expand Down
10 changes: 5 additions & 5 deletions libdwgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
};*/

dwgR::dwgR(){
DRW_DBGSL(DRW_dbg::NONE);
DRW_DBGSL(DRW_dbg::None);
reader = NULL;
// writer = NULL;
applyExt = false;
Expand All @@ -50,13 +50,13 @@ dwgR::~dwgR(){

}

void dwgR::setDebug(DRW::DBG_LEVEL lvl){
void dwgR::setDebug(DRW::DebugLevel lvl){
switch (lvl){
case DRW::DEBUG:
DRW_DBGSL(DRW_dbg::DEBUG);
case DRW::Debug:
DRW_DBGSL(DRW_dbg::Debug);
break;
default:
DRW_DBGSL(DRW_dbg::NONE);
DRW_DBGSL(DRW_dbg::None);
}
}

Expand Down
2 changes: 1 addition & 1 deletion libdwgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class dwgR {
bool getPreview(std::istream &stream);
DRW::Version getVersion(){return version;}
DRW::error getError(){return error;}
void setDebug(DRW::DBG_LEVEL lvl);
void setDebug(DRW::DebugLevel lvl);

private:
bool open(std::istream *stream);
Expand Down
10 changes: 5 additions & 5 deletions libdxfrw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
};*/

dxfRW::dxfRW(){
DRW_DBGSL(DRW_dbg::NONE);
DRW_DBGSL(DRW_dbg::None);
reader = NULL;
writer = NULL;
applyExt = false;
Expand All @@ -50,13 +50,13 @@ dxfRW::~dxfRW(){
imageDef.clear();
}

void dxfRW::setDebug(DRW::DBG_LEVEL lvl){
void dxfRW::setDebug(DRW::DebugLevel lvl){
switch (lvl){
case DRW::DEBUG:
DRW_DBGSL(DRW_dbg::DEBUG);
case DRW::Debug:
DRW_DBGSL(DRW_dbg::Debug);
break;
default:
DRW_DBGSL(DRW_dbg::NONE);
DRW_DBGSL(DRW_dbg::None);
}
}

Expand Down
2 changes: 1 addition & 1 deletion libdxfrw.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class dxfRW {
public:
dxfRW();
~dxfRW();
void setDebug(DRW::DBG_LEVEL lvl);
void setDebug(DRW::DebugLevel lvl);
/// reads the file specified in constructor
/*!
* An interface must be provided. It is used by the class to signal various
Expand Down